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
If dog is a friend of boy, is boy a friend of dog?
What are the unique features of C++.
find the two largest values among the 6 numbers using control structures : do-while,for,if else,nestedif- else ,while. one or two of them.
What is implicit pointer in c++?
List down the guideline that should be followed while using friend function.
Explain about Virtual Function in C++?
Can I make ios apps with c++?
What is #include sstream?
Can static member variables be private?
Mention the purpose of istream class?
Is map ordered c++?
What are namespaces in c++?
How can you specify a class in C++?
What is the meaning of c++?
Differentiate between a pointer and a reference with respect to c++.