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

Does dev c++ support c++ 11?

752


In int main(int argc, char *argv[]) what is argv[0] a) The first argument passed into the program b) The program name c) You can't define main like that

839


How do I make turbo c++ full screen?

787


Can I learn c++ in a week?

784


Is it possible to have a recursive inline function in c++?

761


Is c++ a programming language?

798


What does the ios::ate argument do?

907


Define vptr.

767


What do you mean by function and operator overloading in c++?

799


A prime number is a number which is divisible only by itself and 1. Examples of the first few primes are 2, 3, 5, 7, 11. Consider writing a program which can generate prime numbers for you. Your program should read in and set a maximum prime to generate and a minimum number to start with when looking for primes. This program should be able to perform the following tasks: 1. Read the maximum number from user (keyboard input) to look for primes. The program should not return any primes greater than this number. 2. Read the minimum number from user (keyboard input) to look for primes. The program should not return any primes less than this number. 3. Generate and print out every prime number between the maximum prime and minimum number specified by the user.

1941


Can I learn c++ without knowing c?

798


Explain register storage specifier.

784


Does improper inheritance have a potential to wreck a project?

866


What is the benefit of encapsulation?

824


How are the features of c++ different from c?

794