I just want to know that what is the difference between using Turbo C and GNU C/C++? Is there any real difference, or if I submit the .C file would that be the same thing?
-
4Turbo C/C++ is outdated since decades while GCC is still maintained to keep up with the current standard, to list the differences would fill a whole book. – πάντα ῥεῖ Apr 19 '19 at 17:24
-
2Turbo C++ is 25+ years old. c++ is considerably different than it was in the early to mid 1990s. – drescherjm Apr 19 '19 at 17:24
2 Answers
Is there any real difference, or if I submit the .C file would that be the same thing?
Yes there would be a lot of differences and it would be almost certainly not the same thing. Turbo C/C++ was released decades ago without compliance for any standard definitions and never was updated regarding these.
It will start with differences in naming header files, e.g. iostream.h
vs iostream
, and end with lack of support for modern C++ syntactic sugar like range based for loops.
Just dump it. Turbo C/C++ isn't useful for anything nowadays to learn the language (even if some "professors" in India1 think it is, and insist of using it).
1) We really should start a campaign to convince the indian education public authorities to stop teaching the usage of Turbo C/C++. It's just a shame for a country that plays well with rocket science in competition with other tech leading countries in the world.
There's no reason to keep it. There are many modern compilers and IDE's available without any additional cost, and I can't see any reason why this restriction should be continued, or what they think is of value in education.

- 1
- 13
- 116
- 190
-
8Seeing so many thousands of young students being taught to use software they have to run up in a _DOS emulator_ fills me with sadness. – Lightness Races in Orbit Apr 19 '19 at 18:07
-
@LightnessRacesinOrbit Yes, that's just a shame. Here's more material: https://www.sololearn.com/Discuss/288609/why-to-avoid-turbo-c-tcc – πάντα ῥεῖ Apr 19 '19 at 18:11
Remember that a programming language is a specification (written in some document). It is not a software.
TurboC
Is obsolete, and does not support (and, AFAIK, does not even claim to support) recent enough language standards like C11
or C++11
or C++14
. The language accepted by TurboC
is worse that what the recent language standards specify. Quite often, some code written for TurboC
is not standard conforming, and won’t even compile on a standard conforming implementation (like GCC). TurboC is proprietary software; you cannot see its source code (legally).
GCC
Is supporting (almost all of) recent standards like C11
or C++14
. GCC
is free software, you can download legally, study, and improve its source code. Read What is free software and why is it so important for society? That fact alone makes me prefer GCC
.
TurboC
produces poor executable code (whose performance is not very good) GCC
is able to optimize (when asked to, e.g. g++ -O2
…) and can produce executables having a good performance.
So you should use GCC
, not TurboC
, for your project.
Hint: compile with g++ -Wall -Wextra -g
(to get all warnings & debug information). Improve the code till you get no warnings. Then use the debugger (gdb) till you believe you don’t have bugs. For benchmarking, add an optimization flag like -O2
(or even -O3 -march=native
)
Use GCC with a good editor (e.g. emacs), and a version control system (e.g. git), and a build automation tool (e.g. GNU make)
Clang/LLVM
Is (mostly) a standard conforming free software C & C++ compiler, you could use it instead of GCC.
-
1Turbo C doens't even support any C standard because it was release before the first C standard (1987 vs 1989). In short: never use Turbo C if you want to learn C – phuclv May 01 '21 at 03:53