i m new in c language.plz tell me which compiler is the best GCC or Turbo c...?i m waiting

Dani AI

Generated

This thread is from September 2012. For anyone landing here later: pick a modern, standards‑compliant toolchain for learning portable C, and treat IDEs and compilers as different things — an IDE is a convenience layer around a compiler.

Several posters already suggested modern compilers and IDEs (see , , , ). Practical, current advice: use GCC or Clang (or MSVC on Windows) as your compiler; use an IDE or editor you like (Code::Blocks, VS Code, Dev‑C++ can call GCC). On Windows get a current MinGW‑w64/MSYS2 or use WSL; on macOS and Linux use the system toolchain. A useful compile command to learn is:

gcc -std=c11 -Wall -Wextra -O2 -g -o prog prog.c

and a minimal program:

#include <stdio.h>

int main(void) {
    puts("hello");
    return 0;
}

Troubleshooting tips: run gcc --version to verify the toolchain; add the compiler bin dir to PATH; use -Wall -Wextra to catch problems; link math functions with -lm. Avoid nonstandard headers and functions (for example, conio.h, graphics.h, getch, clrscr) if you want portable code — these are common in old Turbo C examples. If an instructor forces Turbo C for submissions, develop and test on a modern compiler but use DOSBox or a VM to produce the Turbo C build required for grading.

Workflow suggestion: learn ISO C (C99/C11), compile with strict warnings, fix warnings as you go, and practice on the same environment your course or employer will use.

Recommended Answers

All 14 Replies

Unless you're forced by a very backward teaching institution to use Turbo C, or you're maintaining legacy code that must be compiled using Turbo C, GCC (a recent version) is very clearly better.

use Dev C++ as the software to code your programs and you may use gcc as the compiler. I have very good experice with it. start using it. ;)

yeah.. And one more thing i wana add: codeblocks is far better than dev C++ in GUI and usage also.

Use GCC if it is in your decision. is from 80s and 90s.

If the OP is from India he may not have any other choice but to use Turbo C/C++ because sadly that's what is taught in their universities.

commented: agreed +0

Not just India. That's what I was taught to use too!

i am damn happy after listeneing this from queen. ;) thanks dani. I also get hope for my success. ;)

If the OP is from India he may not have any other choice but to use Turbo C/C++ because sadly that's what is taught in their universities

Why is this an issue here ? There are several universities around the globe which uses turbo C/C++. Use of Turbo C/C++ doesn't has any one to one correspondence with the geographical location.

commented: Very true +0

Why is this an issue here ?

India is the only place where I've read that complaint at DaniWeb over the past 8 years. I wasn't trying to make it an "issue", just a passing comment.

If you are running on Windows and don't want to install Cygwin to get the GCC compiler directly, you can use MingW, which is an open source GCC implementation for native Windows applications. When it came out, TurboC/C++ was the bee's knees, but it is sorely dated now and not particularly standards compliant. GCC is a leader in standards compliance, hence portability.

Member Avatar for Member #46692

In fact most universities in the UK use turbo c as well.

Well, at least when I was a freshman, I knew a few compusci students and they had to use turbo c for their c applications.

TBH, it isn't all that bad, the main gripe is the bastardised use of c++ and iostream.h, which was really only used to support cout and cin statements.

But using turbo c for just c is not a bad idea when teaching students, and the graphics library was probably one of the key reasons why it is used.

Dani: Not just India. That's what I was taught to use too!

How long ago was that?

commented: nice question ;) +2

thanks to replying me now using code::blocks feeling easy and comfortable while writting a code....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.