Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / rsn

Hello Shivani,

I think both struct and class in C++ are quite the same
except for the fact that, members in struct are public by
default whereas they are private for class.
Moreover struct also supports inheritance,polymorphism
etc...etc...

Is This Answer Correct ?    14 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is code reusability in c++?

1195


What is #include cmath?

1050


Explain Text Manipulation Routines?

1050


Incase of a function declaration, what is extern means?

925


Can non-public members of another instance of the class be retrieved by the method of the same class?

1049


How would you obtain segment and offset addresses from a far address of a memory location?

1043


If there are two catch statements, one for base and one for derived, which should come first?

1000


. If employee B is the boss of A and C is the boss of B and D is the boss of C and E is the boss of D. Then write a program using the Database such that if an employee name is Asked to Display it also display his bosses with his name. For eg. If C is displayed it should also display D and E with C?

3246


Explain how the virtual base class is different from the conventional base classes of the opps.

1117


C is to C++ as 1 is to a) What the heck b) 2 c) 10

1020


List the issue that the auto_ptr object handles?

976


What is an adaptor class or wrapper class in c++?

1117


What is c++ virtual inheritance?

1090


How does the copy constructor differ from the assignment operator (=)?

1107


Why is c++ still used?

1029