What are the differences between a struct and a class in
C++?
Answer Posted / ajit
In structures by default the member variables considered as
public where as in classes by default data members are
considered as private.
Structures doesn't provide the concept data encapsulation
but classes provides it.
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What is switch case in c++ syntax?
What is a container class?
Name the debugging methods that are used to solve problems?
Write a program which uses functions like strcmp(), strcpy()? etc
What is late binding c++?
Explain how to initialize a const data member.
What is atoi?
What are the three forms of cin.get() and what are their differences?
State the difference between pre and post increment/decrement operations.
Is c++ map a hash table?
What is the difference between while and do while loop? Explain with examples.
What are the types of array in c++?
what is C++ objects?
Is it possible to pass an object of the same class in place of object reference to the copy constructor?
Explain what is polymorphism in c++?