what is the difference between class and structure in C++?
Answer Posted / balaram singh
1->CLASS IS THE ADT WHERE AS STRUCTURE IS UDT
2->CLASS NEEDS ACCESS SPECIFIER SUCH AS PRIVATE,PUBLIC &
PRIVATE WHERE AS STRUCTURE MEMBERS CAN BE ACCESSED BY
PUBLIC BY DEFAULT & DO'NT NEED ANY ACCESIFIERS.
3->CLAAS IS OOPS WHERE STRUCTURE IS BORROWED FROM
TRADITIONAL STRUCTURED(POP) CONCEPT
| Is This Answer Correct ? | 13 Yes | 4 No |
Post New Answer View All Answers
What is destructor in oop?
What is super in oop?
What is the diamond problem in inheritance?
How to improve object oriented design skills?
Can we create object of abstract class?
What are different types of JVM's? for example we use dalvik jvm for android then what about the remaining operating systems?
Why multiple inheritance is not possible?
What is difference between inheritance and polymorphism?
What are oops methods?
class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash
Is react oop?
Can we override main method?
What is interface? When and where is it used?
What are the benefits of oop?
Describe these concepts: Polymorphism, Inheritance and Abstraction.