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

Answer Posted / k.r.sukumar

The main difference between c and c++ is that " C is a
structured programming language while C++ is an object
programming language and also we have templates in C++ that
is not the case in C

Is This Answer Correct ?    946 Yes 139 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is object in oop with example?

924


Where You Can Use Interface in your Project

1587


What does it mean when someone says I oop?

775


How many human genes are polymorphic?

755


Why interface is used?

718






What are the data types in oop?

789


What is abstract class in oop?

719


write a program that takes input in digits and display the result in words from 1 to 1000

2167


State what is encapsulation and friend function?

907


How do you achieve polymorphism?

803


What is a function in oop?

806


What is oops and its features?

801


#include #include #include #include void insert(struct btreenode **, int); void inorder(struct btreenode *); struct btreenode { struct btreenode *leftchild; struct btreenode *rightchild; int data; }; main() { struct btreenode *bt; bt=(struct btreenode *)NULL; int req,i=1,num; clrscr(); printf("Enter number of nodes"); scanf("%d",&req); while(i<=req) { printf("Enter element"); scanf("%d",&num); insert(&bt,num); i++; } inorder(bt); } void insert(struct btreenode **sr, int num) { if(*sr==NULL) { *sr=(struct btreenode *)malloc (sizeof(struct btreenode)); (*sr)->leftchild=(struct btreenode *)NULL; (*sr)->rightchild=(struct btreenode *)NULL; (*sr)->data=num; return; } else { if(num < (*sr)->data) insert(&(*sr)->leftchild,num); else insert(&(*sr)->rightchild,num); } return; } void inorder(struct btreenode *sr) { if(sr!=(struct btreenode *)NULL) { inorder(sr->leftchild); printf("\n %d",sr->data); inorder(sr->rightchild); } else return; } please Modify the given program and add two methods for post order and pre order traversals.

3490


What is class and object in oops?

797


how to get the oracle certification? send me the answer

1869