DIFFERNCE BETWEEN THE C++ AND C LANGUAGE?

Answers were Sorted based on User's Feedback



DIFFERNCE BETWEEN THE C++ AND C LANGUAGE?..

Answer / vignesh1998i

1) C is structured oriented language and C++ is an object oriented language
2) in C we must finish our decleration in the very next line of void main() , but in Cpp wherever u need a variable storage data , before that instruction we must declare it......
3) In C structures are used , in that only data members can only be declared and member functions not included , but in Cpp inside a class (same as strucutres) both data members as well as member functions can be used..
4) in Structure all the members and strucutre variables are global by default...... but in Cpp by default the data members are private.....


SIMILARITY :
1) both C & C++ uses Overloading concept....... (very important )

thank u

Is This Answer Correct ?    3 Yes 1 No

DIFFERNCE BETWEEN THE C++ AND C LANGUAGE?..

Answer / manish soni tagore collage jai

main deference in c and cpp is



-------------------|-------------------|
c | c++ |
-------------------|-------------------|
top down approach | bottom up approach|
-------------------|-------------------|

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C Interview Questions

Linked lists -- can you tell me how to check whether a linked list is circular?

0 Answers  


What are different storage class specifiers in c?

0 Answers  


main() { char *ptr = "Ramco Systems"; (*ptr)++; printf("%s\n",ptr); ptr++; printf("%s\n",ptr); } Find the Outputs?

9 Answers   BTBP, CitiGroup,


give an example of type casting by a simple c program

2 Answers   TCS,


What is the output of below code? main() { static int a=5; printf("%3d",a--); if(a) main(); }

1 Answers  






What will the code below print when it is executed?   int x = 3, y = 4;         if (x = 4)                 y = 5;         else                 y = 2;         printf ("x=%d, y=%d ",x,y);

0 Answers  


sir i wanted to know how we wap in c to add numbers without using arithmetic operator in which digits are entered by user?

2 Answers  


is it possible to change the default calling convention in c ?

1 Answers   Aptech,


main() { int i; printf("%d",scanf"%d",&i))//if the input is 12 24 34 then wat will be the output }

2 Answers  


Once I have used freopen, how can I get the original stdout (or stdin) back?

0 Answers  


Do variables need to be initialized?

0 Answers  


write a program to reverse the words in the sentence.NOTE:not reverse the entire string but just the occurance of each word

1 Answers   Sienna Ecad, Wipro,


Categories