+ 2

What is there in c which isn't in c++...

if there is everything in c++ then why we are taught c language

29th Jul 2017, 5:22 PM
Pawan Kumar
Pawan Kumar - avatar
2 odpowiedzi
+ 3
There is no "++" in C. Just kidding, I believe the main differences are that C requires the user to allocate/deallocate their own memory. C also has structs but does not have classes. As far as coding C++ makes things much easier for the programmer as it removes having to do a bunch of low-level operations. I believe they still teach C to first year students because it gives you a basic understanding of how things work. Similarly in math you learn how + and - work before learning × and /. In theory you can get the same results by adding and subtracting a bunch of numbers but using multiplication and division can save you a great deal of time.
29th Jul 2017, 5:44 PM
S C
0
The main difference is C is procedure oriented programming (pop) and C++ is object oriented programming (oop)
29th Jul 2017, 5:49 PM
Rajesh Rajendran