What is size of empty class object

Answer Posted / manish shikarbar

answer is :1

Example:

class Test
{
};

Test Obj;

int size = sizeof(Obj); // answer is 1

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does it mean to declare a destructor as static?

714


What is a manipulator in c++?

795


what is c++

1882


Which is the best c++ software?

706


What is the difference between while and do while loop?

668






What is c++ w3school?

738


What is diamond problem in c++?

633


What is a friend function in c++?

671


What is difference between c++ 11 and c++ 14?

661


What do c++ programmers do?

654


Difference between strdup and strcpy?

757


What do nonglobal variables default to a) auto b) register c) static

752


What is a constant reference?

705


write a function signature with various number of parameters.

669


Why do we use double in c++?

721