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

Prove or disprove P!=NP.

5 Answers   Microsoft,


explain what are actual arguments?

0 Answers  


i=20,k=0; for(j=1;j<i;j=1+4*(i/j)) { k+=j<10?4:3; } printf("%d", k);

8 Answers   HCL,


What does c value mean?

0 Answers  


value = 0xabcd; for (loop = 1; (value >> 1) & 1 | loop & 1; loop++) { foo(); if (loop & 1) value >>= 1; } how many times is foo() executed?

6 Answers   Google,






What is a method in c?

0 Answers  


how to determine the complexity of an algorithm as log(n)

1 Answers   Google,


Draw a flowchart to produce a printed list of all the students over the age of 20 in a class .The input records contains the name and age of students. Assume a sentinel value of 99 for the age field of the trailer record

0 Answers   Wipro,


main() { char *p1="Name"; char *p2; p2=(char *)malloc(20); while(*p2++=*p1++); printf("%s\n",p2); } what is the output?

7 Answers   AMCAT, HCL, Ramco, Zycus Infotech,


Explain Basic concepts of C language?

0 Answers   EXL,


Do you know the use of 'auto' keyword?

0 Answers  


write a c program to calculate sum of digits till it reduces to a single digit using recursion

0 Answers   IBM,


Categories