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 do you mean by inheritance in c++?
What does it mean to declare a member variable as static?
Why do we use classes in c++?
Explain the concept of dynamic allocation of memory?
What is difference between class and structure in c++?
If you hear the cpu fan is running and the monitor power is still on, but you did not see anything show up in the monitor screen. What would you do to find out what is going wrong?
What is #include math h in c++?
Explain this pointer?
Can you help me with this one? Make a program that when a user inputed a Product Name, it will display its price, and when the user inputed the quantity of the inputed product, it will show its total price. The output must be like this: Product Name: Price: Quantity: Total Price: ..this is the list of products to be inputed: Cellphone - 1500 Washing Machine - 5200 Television - 6000 Refrigirator - 8000 Oven - 2000 Computer - 11000 thanks..:D
How a new element can be added or pushed in a stack?
Can you explicitly call a destructor on a local variable?
What does catch(…) mean?
What is meant by iomanip in c++?
What is c++ array?
Why do we use vector in c++?