what is the main difference between c and c++?

Answer Posted / sureshkumar koppineedi

C is a procedural oriented language .
c++ is a object oriented language.
OOps concepts are 1)encapsulation:-Taking data and methods
as an unit is called encapsulation.
2)Abstraction:-Hiding unnecessary data from the user is called
abstraction
3)Inheritence:-producing new classes from the existing classes.
4)Polymorphism:-Ability to exist in more than one form.

Is This Answer Correct ?    18 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is basic concept of oop?

696


What does oop mean in snapchat?

680


What is meant by multiple inheritance?

733


What is class and object in oops?

607


How does polymorphism work?

635






IS IT NECESSARY TO INITIALIZE VARIABLE? WHAT IF THE INSTANCE VARIABLE IS DECLARED final ? IS IT NECESSARY TO INITIALIZE THE final VARIABLE AT THE TIME OF THEIR DECLARATION?

1575


#include #include #include #include void insert(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); insert(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void insert(char *items, int count) { register int a, b; char t; for(a=1; a < count; ++a) { t = items[a]; for(b=a-1; (b >= 0) && (t < items[b]); b--) items[b+1] = items[b]; items[b+1] = t; } } design an algorithm for Insertion Sort

2160


What are the advantages of polymorphism?

573


Is enum a class?

602


What is cohesion in oop?

619


Why do while loop is used?

570


What is abstract class in oops?

596


Templates mean

1587


What is encapsulation example?

545


Write a program to reverse a string using recursive function?

1788