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
How a pointer differs from a reference?
Can constructor be private in c++?
Is it possible to provide default values while overloading a binary operator?
Write a code/algo to find the frequency of each element in an array?
Can a program run without main?
Why are arrays usually processed with for loop?
If a function doesn’t return a value, how do you declare the function?
What does extern mean in a function declaration in c++?
What is istream and ostream in c++?
How can you link a c program with a c function?
What is a Default constructor?
How can we access protected and private members of a class?
How is c++ used in the real world?
What are c++ templates used for?
What is this pointer in c++?