Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do people still use C when they have C++? [closed]

Tags:

c++

c

My question is this, why do people still use C when they have C++? I've studied C because it is considered the language on which programmers communicate and is recommended for any programmer to know. I've then passed to C++ and I now think, why do people still use and program in C? As far as I see, C++ is more powerful (has OOP aspects in it), it is as fast as C and overall just seems to be better. I've seen people dislike C++ because it is too hard to code in.

like image 684
Vadiklk Avatar asked Mar 11 '11 09:03

Vadiklk


2 Answers

C is much simpler, and more fun to program in.

But what's more, the compiler is much much easier to write so there are still lots of environments where you can either only get a C compiler or the C++ compiler is far inferior (buggy, slower, generates bloated binaries).

like image 135
Makis Avatar answered Oct 18 '22 22:10

Makis


C is often used for hardware programming, some microcontrollers and similar hardware often have a compiler which turns C code into native instructions for it. It makes programming those pieces of hardware much simpler than writing raw assembly.

like image 45
Argote Avatar answered Oct 18 '22 20:10

Argote