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 is size of a object of following class?
class Foo
{
public:
void foo(){}
}

Answer Posted / jitendra varshney

The size of the object here will be 1. Because by default,
if no variable is declared in the class the size of object is 1.
this is due to fact that when two or more object of the
class is defined then they would have the different
addresses. But if size would have been zero then it might be
possible that two or more object can have the same address.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain "const" reference arguments in function?

1114


Is c++ pass by reference or value?

1126


What are member functions used in c++?

1210


what are the types of Member Functions?

1178


what are the decision making statements in C++? Explain if statement with an example?

1148


Is c++ low level?

1078


What is c++ prototype?

1313


What are pointers used for c++?

1107


Will a catch statement catch a derived exception if it is looking for the base class?

1064


What is this weird colon-member (" : ") syntax in the constructor?

1073


What is the main use of c++?

1170


Show the declaration for a static function pointer.

1111


what is C++ exceptional handling?

1259


Is c++ fully object oriented?

1021


Why are pointers not used in c++?

1194