What is size of a empty class?

Answer Posted / ganesh

when ever an datamember is not the part of the class then default value for object size is 1 byte.
but if int a;
char c;
then it will consume 3 bytes .........

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does obj stand for?

847


What is the difference between an external iterator and an internal iterator? Describe an advantage of the external iterator.

798


What is searching?

867


Which bit wise operator is suitable for putting on a particular bit in a number?

948


What is called array?

810


Does c++ have foreach?

741


Can a program run without main function?

889


Explain some examples of operator overloading?

868


What flag means?

710


What is array in c++ pdf?

784


What do you mean by inheritance in c++?

821


What is the array and initializing arrays in c++?

724


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

2071


What is the type of 'this' pointer?

796


What is the last index number in an array of 100 characters a) 100 b) 99 c) 101

857