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
Write a Program to find the largest of 4 no using macros.
What is a far pointer? where we use it?
Can we distribute function templates and class templates in object libraries?
How to declaring variables in c++?
Why are arrays usually processed with for loop?
Can we make any program in c++ without using any header file and what is the shortest program in c++.
What are the defining traits of an object-oriented language?
Write a program using GUI concept for the scheduling algorithms in Operating system like SJF,FCFS etc..
How do I get good at c++ programming?
Explain abstraction.
Can I create my own functions in c++?
Why is main an int?
What are the types of array in c++?
What is rtti in c++?
What is a constructor in c++ with example?