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
What is expression parser in c++
What do you understand by zombie objects in c++?
What is the advantage of an external iterator.
What are compilers in c++?
Is c++ low level?
Who created c++?
What is function overriding in c++?
What is static class data?
Write about the members that a derived class can add?
How one would use switch in a program?
Can notepad ++ run c++?
What is general format for a prototype?
What are arrays c++?
Which one is better- macro or function?
What is data abstraction? How is it different from data encapsulation?