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

Which is not a valid keyword a) public b) protected c) guarded

1256


Which function should be used to free the memory allocated by calloc()?

1021


Explain the difference between overloading and overriding?

1136


Describe private, protected and public – the differences and give examples.

1188


Write a program to show polymorphism in C++?

1139


What is bubble sort c++?

1001


What are inline functions? What is the syntax for defining an inline function?

1156


the maximum length of a character constant can be a) 2 b) 1 c) 8

1092


Can user-defined object be declared as static data member of another class?

1019


Explain polymorphism?

1073


Which is the best c++ compiler?

1048


Is c++ the hardest language?

983


What is #include ctype h in c++?

1161


Can constructor be private in c++?

1037


Explain the term memory alignment?

1230