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
Differentiate between the message and method in c++?
Is c or c++ more useful?
Why can templates only be implemented in the header file?
Is there any difference between int [] a and int a [] in c++?
What is the use of object in c++?
What is a memory leak c++?
How to demonstrate the use of a variable?
What is a container class?
Differentiate between the manipulator and setf( ) function?
What is an adjust field format flag?
What is the advantage of an external iterator.
What are the advantages of using pointers in a program?
Which is the best c++ compiler for beginners?
Explain the difference between struct and class in terms of access modifier.
Which format specifier is used for printing a pointer value?