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
What do you mean by inheritance in c++? Explain its types.
What do you mean by funtion prototype?
What is a pointer with example?
Can union be self referenced?
What are the unique features of C++.
Can c++ be faster than c?
why and when we can declar member fuction as a private in the class?
Can comments be longer than one line?
Explain the difference between c++ and java.
What is a class template in c++?
What is a breakpoint?
What are advantages of using friend classes?
Which is better c++ or java?
Which one is better- macro or function?
What is the best c++ ide?