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 is scope resolution operator in c++ with example?
What is friend class in c++ with example?
What is the difference between an enumeration and a set of pre-processor # defines?
What is the difference between new() and malloc()?
Where are setjmp and longjmp used in c++?
Will a C compiler always compile C++ code a) Yes b) No c) Only optimized compilers
What would happen on forgetting [], while deallocating an array through new?
Is c++ faster than c?
What is the two main roles of operating system?
What is the difference between while and do while loop? Explain with examples.
How is computer programming useful in real life?
What is the extension of c++?
Difference between struct and class in terms of access modifier.
What do you mean by function and operator overloading in c++?
When must you use a pointer rather than a reference?