Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
I don't know C. And why should I learn it?

I was kind of awkward in coding with C, though I am somewhat familiar with it. I like Java and C#. The reason I like to code with them is for better GUI application development. With C, it's hard to code for a better appearance of any application. I understand the fact that C is the basis of all. But now we have tons of libraries which can help us to do anything in no time. But why do many people still code in the C programming language?

share|improve this question

marked as duplicate by Yannis, Joris Timmermans, ChrisF Dec 3 '11 at 20:04

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 2 down vote accepted

Even if we have tons of libraries, this doesn't mean we have already developed all (low level) libraries or software we will ever need.

As a trivial example, when a new graphic card is produced, we need to write a driver for it. Since you need top speed, the choice will be C (or C++, or other languages that are close to the metal).

Likewise, when you implement a compiler or runtime for a new language or operating system, it must be in some low level language. C is a good candidate for that.

share|improve this answer
or maybe C++? Are you asking? In an answer? – Yannis Dec 3 '11 at 9:26
I was suggesting that C is not the only good candidate for speed: C++ is also one even though the question is about C. The question mark does not indicate a real question. – Giorgio Dec 3 '11 at 9:28
In retrospect my downvote was a little harsh it. I came back soon enough to retract. But in general you should avoid rhetoricals in your answers. An answer's purpose is to help with the confusion in a question and a rhetorical may add confusion. Answers should be as clearly defined and specific as possible. Bear in mind that you have a lot of opinions in your answer that are not backed by references. You don't tell us why C would be a good candidate for anything, just that it is. That deserves a downvote in my book. (but not now, because my initial reason for downvoting was a little foolish) – Yannis Dec 3 '11 at 9:35
Ok. Thanks. I have changed the formulation. I mentioned C++ and other languages because saying that C was the only possibility was too restrictive. – Giorgio Dec 3 '11 at 9:36
btw the part for the unbacked opinions was for the original version of the question. "close to the metal" is good enough for me, and you don't need to back it up as it's common knowledge to all developers (or it should be). – Yannis Dec 3 '11 at 9:53

I think your assertion about GUI programming in C is incorrect. Something like GTK+ is written in C, and can produce a good looking UI.

At its core, the Win32 API is also written in C, so technically you can do anything with it that you can do in .NET, albeit with a lot more effort. Having total control over the "fine-grained" properties of your UI is still a necessity for some developers.

In the bigger picture, as long as there are C programs to be maintained, there will always be a need to program in C. Many languages (e.g., COBOL) still have an installed code base over half a century later.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.