What are the differences between a struct and a class in
C++?

Answer Posted / ramesh kasi

The only difference is related to the default access
specifier.
The members of a structure have public access by default.
The members of a calss have private access by default.

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the characteristics of friend functions?

570


What do you mean by global variables?

574


What header file is needed for exit(); a) stdlib.h b) conio.h c) dos.h

614


What is & in c++ function?

597


Is it possible to use a new for the reallocation of pointers ?

601






Explain the extern storage classes in c++.

556


Is c++ a programming language?

598


Why is standard template library used?

588


What is c++ iterator?

649


What is rvalue?

682


What is a c++ vector?

597


What are static and dynamic type checking?

618


What are arrays c++?

612


What is the syntax for a for loop?

603


Differentiate between an external iterator and an internal iterator?

572