+ 1

Why is C still used today if we have C++ ?

C vs C++

12th Mar 2018, 1:58 AM
Baraja
3 Answers
+ 15
There are systems where memory is so tight that C or Assembly are your only choices. C is much easier to code and can produce binary similar to Assembly so it is usually selected. C++ runtime library is bigger and more interconnected so more ends up linking into the final executable making it bigger over similar C code.
12th Mar 2018, 2:28 AM
John Wells
John Wells - avatar
+ 7
Also C is easy to implement, so the guys who have to write compilers can make a C compiler a lot faster than a C++ one. C is often the common language that everyone speaks (like english), so it will always be around!
12th Mar 2018, 3:04 AM
Schindlabua
Schindlabua - avatar
+ 1
Dennis Ritchie created C to develop an operating system, being Unix. Plus it is harder to produce tiny executables with C++ , especially when you need extreme performance. However C++ has some good points about it over C. It uses templates and inline functions which are more safer than in C . C uses macros which are not type safe , that is the arguments in the macro have no type.
13th Mar 2018, 6:44 AM
Rick Zalman