What is size of null class?

Answer Posted / divyachinnamaru

Eg :
class A // empty class
{

};
int main()
{
cout<<"size of class is "<<sizeof(A)<<endl;
return 0;
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I learn dev c++ programming?

577


What happens if a pointer is deleted twice?

800


What is null and void pointer?

606


Can we use pointers in c++?

624


Why cstdlib is used in c++?

591






Explain rtti.

601


What is endl?

650


What does new return if there is insufficient memory to make your new object?

599


an operation between an integer and real always yeilds a) integer result b) real result c) float result

722


What is a unnitialised pointer?

542


Can we inherit constructor in c++?

601


How the keyword struct is different from the keyword class in c++?

593


What is the cout in c++?

563


What is the use of register keyword with the variables?

559


How can you quickly find the number of elements stored in a a) static array b) dynamic array ? Why is it difficult to store linked list in an array?how can you find the nodes with repetetive data in a linked list?

665