What is the difference between a class and a structure in C++?

Answer Posted / nashiinformaticssolutions

With the exception of member variables and methods' default accessibility setting, class and structure (or struct) are essentially the same in C++. They are configured as public in a structure and private in a class.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is long in c++?

1001


Explain how to initialize a const member data.

819


What is array in c++ pdf?

803


How do I get good at c++ programming?

864


What is the difference between an external iterator and an internal iterator?

865


How can an improvement in the quality of software be done by try/catch/throw?

832


How the virtual functions maintain the call up?

853


Which of the following is not a valid declaration for main() a) int main() b) int main(int argc, char *argv[]) c) They both work

850


What is the average salary of a c++ programmer?

795


Can you be able to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?

854


Why do we need c++?

804


Why cstdlib is used in c++?

807


Is there finally in c++?

839


What are static type checking?

833


What does iomanip mean in c++?

901