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 |
Linked lists -- can you tell me how to check whether a linked list is circular?
What are different storage class specifiers in c?
main() { char *ptr = "Ramco Systems"; (*ptr)++; printf("%s\n",ptr); ptr++; printf("%s\n",ptr); } Find the Outputs?
give an example of type casting by a simple c program
What is the output of below code? main() { static int a=5; printf("%3d",a--); if(a) main(); }
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);
sir i wanted to know how we wap in c to add numbers without using arithmetic operator in which digits are entered by user?
is it possible to change the default calling convention in c ?
main() { int i; printf("%d",scanf"%d",&i))//if the input is 12 24 34 then wat will be the output }
Once I have used freopen, how can I get the original stdout (or stdin) back?
Do variables need to be initialized?
write a program to reverse the words in the sentence.NOTE:not reverse the entire string but just the occurance of each word