difference between c and c++?

Answer Posted / pragati paliwal

1.c is procedure oriented lang. while c++ is object oriented lang.
2. in c data security is less because all function shares global data,while in c++ data security is most because of binding of data with function in a single unit called class.This feature of c++ is called encapsulation.
3.c does not deal with real world problems properly.eg. maintaining a database. while c++ deals with real world problems.
4.in c if we need to change the data structure then we have to change the coding of all the functions which are using that data,while in c++ if we need to change the data structure change only data structure of those functions which are binded with that data.

Is This Answer Correct ?    14 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Should the member functions which are made public in the base class be hidden?

658


What are the important differences between c++ and java?

708


How to declare an array of pointers to integer?

688


Can we use this pointer in a class specific, operator-overloading function for new operator?

699


How do you define/declare constants in c++?

693






Write a program for Divide a number with 2 and Print the output ( NOTE: Check for divide by zero error).

727


Explain the volatile and mutable keywords.

716


Define basic type of variable used for a different condition in C++?

759


What does new in c++ do?

650


Difference between an inspector and a mutator

923


What is the use of "new" operator?

761


What does count ++ do in c++?

789


Do vectors start at 0 c++?

633


Describe exception handling concept with an example?

643


Why pointer is used in c++?

710