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
What kind of problems can be solved by a namespace?
What is a wchar_t in c++?
Is oops and c++ same?
What is an overflow error?
How many namespaces are there in c++?
When should we use container classes instead of arrays?
Why do we use constructor?
What is meant by iomanip in c++?
Mention the ways in which parameterized can be invoked.
What is the difference between new() and malloc()?
When do we run a shell in the unix system?
What do c++ programmers do?
What do you mean by ‘void’ return type?
What does return 0 do in c++?
Is c++ vector a linked list?