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

How is static data member similar to a global variable?

838


What is c++ vb?

840


Can we delete this pointer in c++?

951


Explain dangling pointer.

874


Write about a nested class and mention its use?

826


Why c++ is created?

754


what is c++

2068


Must accepts "Maestro Cards" Tax for bike should be less than 15 Total number of lanes is more than 10 Must provides monthly pass Write a method: boolean isGoodTollBridge(String[] cardsAccepted, String[] tollTax, boolean hasMonthlyPass, int numberOfLanes); String[] cardsAccepted A String array of names of card types accepted for payment of toll tax, it can be null if the toll does not accept any card String[] tollTax A String array of toll tax chart (say “Train : 300”,”BullCart : 10”) boolean hasMonthlyPass This parameter defines whether there is any monthly pass available or not int numberOfLanes This parameter defines the number of lanes for each side

3245


What is #include iomanip?

756


What does ios :: app do in c++?

777


What is a container class? What are the types of container classes in c++?

884


What is #include cstdlib in c++?

894


To which numbering system can the binary number 1101100100111100 be easily converted to?

817


What is basic if statement syntax?

775


What is the syntax for a for loop?

812