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

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is meant by a delegate?

804


What are the stages in the development cycle?

778


What is virtual table?

821


What is the difference between the indirection operator and the address of oper-ator?

826


Describe linkages and types of linkages?

771


What are virtual constructors/destructors?

768


How can I learn dev c++ programming?

776


Explain how a pointer to function can be declared in C++?

773


What are single and multiple inheritances in c++?

778


Differentiate between an inspector and a mutator ?

910


What do you mean by static variables?

845


Do you know the use of vtable?

864


What is the difference between mutex and binary semaphore?

836


What are references in c++?

885


why is c++ called oops? Explain

804