wht is major diff b/w c and c++?

Answer Posted / narender vadhava

in c we can use if statements only for 16times but in c++ ,
we can use if for 256 times.
in c it's difficult to solve complex no but in c++ we can
solve easily by using classes.
c follows down to up approach to complie a program but
c++ follow up to down approach.
in c++ we can add variables any where within the program
but in c data type are declared only on the starting of the
function or the main program.

Is This Answer Correct ?    41 Yes 20 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is methods in oop?

535


Why we use classes in oop?

571


Why do we need oop?

656


#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

2157


Which is better struts or spring?

612






What is polymorphism in oop example?

507


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

1980


Explain the advantages of inheritance.

666


Why do we use polymorphism?

569


What is polymorphism what is it for and how is it used?

570


explain sub-type and sub class? atleast u have differ it into 4 points?

1828


How to call a non virtual function in the derived class by using base class pointer

5244


what are the realtime excercises in C++?

2328


i=20;k=0; for(j=1;k-i;k+=j<10?4:3) { cout<

1409


c++ program to swap the objects of two different classes

1752