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


Please Help Members By Posting Answers For Below Questions

the maximum length of a character constant can be a) 2 b) 1 c) 8

600


What happens if a pointer is deleted twice?

787


daily Routine of father

907


Explain Text Manipulation Routines?

644


Is overriding possible in c++?

569






Define pre-condition and post-condition to a member function in c++?

658


What is null and void pointer?

591


What are inline functions? What is the syntax for defining an inline function?

578


Which software is best for coding?

572


Differentiate between declaration and definition.

585


How can I learn dev c++ programming?

563


What is the difference between global variables and static varables?

567


Which of the following is evaluated first: a) && b) || c) !

1803


Why is c++ a mid-level programming language?

591


What are the unique features of C++.

569