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 are static variables?
Define private, protected and public access control.
Is c++ an oop?
Define a nested class. Explain how it can be useful.
Why Pointers are not used in C++?
Explain deep copy?
What is difference between malloc()/free() and new/delete?
How many standards of c++ are there?
What are stacks?
What is abstraction c++?
Can I learn c++ without c?
Can manipulators fall in love?
You have two pairs: new() and delete() and another pair : alloc() and free(). Explain differences between eg. New() and malloc()
What is iterator c++?
Can we make any program in c++ without using any header file and what is the shortest program in c++.