Saturday, May 9, 2009

Can anyone give me a source code which would work in ANSI C or GNU C but not in Turbo C?

I don't have a source code example to hand but check out http://www.sandroid.org/TurboC/index.htm... and specifically http://www.sandroid.org/TurboC/functionl...





I'd stick with GCC it overtook TurboC in functionality years ago, I used to like the DOS IDE that TurboC used, but you can have a far more powerful IDE using emacs and gcc together.





Why do you ask this question? Are you having a debate with a teacher or something?

Can anyone give me a source code which would work in ANSI C or GNU C but not in Turbo C?
Turbo C and GNU C are both implementation of the ANSI C standard. Anything that is legal ANSI C will compile in either one. That said, every compiler adds extensions to the language, these will probably not work in other compilers. The often quoted example is the library "conio.h" that is in Turbo C but not in standard ANSI C. So any call that uses "conio.h" will compile under TURBO C but not another ANCI C compiler like gcc.


No comments:

Post a Comment