DIFFERNCE BETWEEN THE C++ AND C LANGUAGE?
Answers were Sorted based on User's Feedback
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 |
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 |
Prove or disprove P!=NP.
explain what are actual arguments?
i=20,k=0; for(j=1;j<i;j=1+4*(i/j)) { k+=j<10?4:3; } printf("%d", k);
What does c value mean?
value = 0xabcd; for (loop = 1; (value >> 1) & 1 | loop & 1; loop++) { foo(); if (loop & 1) value >>= 1; } how many times is foo() executed?
What is a method in c?
how to determine the complexity of an algorithm as log(n)
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
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?
Do you know the use of 'auto' keyword?
write a c program to calculate sum of digits till it reduces to a single digit using recursion