+ 1
Why is C still used today if we have C++ ?
C vs C++
3 Antworten
+ 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.
+ 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!
+ 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.