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(){}
}

Answers were Sorted based on User's Feedback



What is size of a object of following class? class Foo { public: void foo(){} }..

Answer / sirama

Size of the Object 1 Byte (ie) 8 bits. Because that is
minimum possible size required to allocate something on
memory.

Say If a Create the Object like Foo obj;
Something needs to loaded on Stack. But, actually it does
not have any internal data memebers. Hence, the minimum
possible is 1 Byte.

Is This Answer Correct ?    5 Yes 0 No

What is size of a object of following class? class Foo { public: void foo(){} }..

Answer / 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

More C++ General Interview Questions

What is a null object in c++?

0 Answers  


Write any small program that will compile in "C" but not in "C++"

10 Answers   Honeywell,


Will rust take over c++?

0 Answers  


If we want that any wildcard characters in the command line arguments should be appropriately expanded, are we required to make any special provision? If yes, which?

0 Answers  


What is meant by the term name mangling in c++?

0 Answers  


What are the two shift operators and what are their functions?

0 Answers  


How do we balance an AVL Tree in C++?

0 Answers   Impetus,


Why namespace is used in c++?

0 Answers  


What new()is different from malloc()?

0 Answers  


How delete [] is different from delete?

0 Answers  


Give a very good method to count the number of ones in a "n" (e.g. 32) bit number.

3 Answers  


Define pure virtual function?

0 Answers  


Categories