whats the size of class EXP on 32 bit processor?
class EXP
{
char c1;
char c2;
int i1;
int i2;
char *ptr;
static int mem;
};

Answer Posted / sandeep mannarakkal

Static is independent of object but associated with class, i.e size of the object is independent of the static.
so here answer is 16 byes.(with the assumption of structure padding is available.)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Differentiate between the message and method in c++?

618


Is c or c++ more useful?

587


Why can templates only be implemented in the header file?

671


Is there any difference between int [] a and int a [] in c++?

563


What is the use of object in c++?

589






What is a memory leak c++?

598


How to demonstrate the use of a variable?

648


What is a container class?

632


Differentiate between the manipulator and setf( ) function?

606


What is an adjust field format flag?

661


What is the advantage of an external iterator.

584


What are the advantages of using pointers in a program?

689


Which is the best c++ compiler for beginners?

572


Explain the difference between struct and class in terms of access modifier.

707


Which format specifier is used for printing a pointer value?

588