What is the Difference between "C structure" and "C++
structure"?
Answers were Sorted based on User's Feedback
Answer / asif iqbal
1.C is a procedural oriented lang. whereas C++ is an object oriented lang.
2.C employs bottom-up aproach whereas C++ employs top-down approach.
3.In C main preference is given to functions whereas in C++ main preference is given to objects.
4.In C no inheritence,polymorphism whereas in C++ it exists.
5.In C data member and member functions are separated whereas in C++ they are within a Class.
| Is This Answer Correct ? | 1 Yes | 8 No |
Answer / guest
C++ DOES NOT HAVE INHERITANCE IT DOSE NOT HAVE POINTERS N
HEADER FILES
| Is This Answer Correct ? | 7 Yes | 33 No |
Can non-public members of another instance of the class be retrieved by the method of the same class?
How to allocate memory dynamically for a reference?
What do you mean by volatile and mutable keywords used in c++?
What is #include sstream?
What is c++ & why it is used?
What are advantages of C++ when comparing with C?
18 Answers HP, iGate, TCS,
Define copy constructor.
Define a nested class. Explain how it can be useful.
Write a program to interchange 2 variables without using the third one.
this is to swap to strings....but in output the whole strings are swapped leaving first as it is...why it is so #include<iostream.h> int main() { char a[]="ajeet"; char b[]="singh"; long x=*a; long y=*b; cout<<x<<":"<<y; x=x+y; y=x-y; x=x-y; *a=x; *b=y; cout<<x<<":"<<y; cout<<&a<<endl; cout<<&b<<endl; }
Why is c++ difficult?
Discuss the effects occur, after an exception thrown by a member function is unspecified by an exception specification?