What is the difference between Class and Structure?
Answer Posted / navin
Structure: Initially (in C) a structure was used to bundle
different type of data types together to perform a
particular functionality. But C++ extended the structure to
contain functions also. The major difference is that all
declarations inside a structure are by default public.
Class: Class is a successor of Structure. By default all
the members inside the class are private.
Is This Answer Correct ? | 182 Yes | 55 No |
Post New Answer View All Answers
What is recursion?
What can I use instead of namespace std?
What is the latest version on c++?
write a porgram in c++ that reads an integer and print the biggest digit in the number
Is ca high or low level language?
Explain function overloading
What do you mean by const correctness?
What is the difference between prefix and postfix versions of operator++()?
What do the keywords volatile and mean mutable?
What are the rules for naming an identifier?
Differentiate between a template class and class template in c++?
What is a class template in c++?
What is using namespace std in c++?
Should the member functions which are made public in the base class be hidden?
What is the full form nasa?