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
How do you flush a buffer in c++?
What is virtual table?
How a pointer differs from a reference?
How const int *ourpointer differs from int const *ourpointer?
What is c++ similar to?
What are the various operations performed on stack?
What does namespace mean in c++?
What is capacity in vector in c++?
Describe the process of creation and destruction of a derived class object?
What is a friend function in c++?
Which of the following is not a valid declaration for main() a) int main() b) int main(int argc, char *argv[]) c) They both work
Mention the ways in which parameterized can be invoked.
describe private access specifiers?
write a function signature with various number of parameters.
What is & in c++ function?