WD Interview Question

What are the differences between C++ and C?

Interview Answer

Anonymous

Nov 22, 2019

From a practical programmers perspective, C does not have destructors so you can leak memory very easily if you are not careful. Additionally there are no classes, member functions, and of course no virtual dispatching. From experience, C tends* to use smaller program space than C++ as well. Some technical differences are a lack of pointers, different meaning in `auto`, and no templates (ofc there are more differences on top of that though).