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 / shrinidhi
20 bytes.
static is given memory in heap.
for 1st two data members c1 and c2 compiler will take 4
bytes cz of padding.
Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Do inline functions improve performance?
How do you differentiate between overloading the prefix and postfix increments?
What is lazy initialization in c++?
Which is not a valid keyword a) public b) protected c) guarded
Comment on assignment operator in c++.
Why is c++ a mid-level programming language?
What is buffer and example?
What is friend class in c++ with example?
What is enum class in c++?
What is the difference between function overloading and operator overloading?
What are the effects after calling the delete this operator ?
Who was the creator of c++?
How does atoi function work?
write a corrected statement so that the instruction will work properly. if (4 < x < 11) y = 2 * x;
What is the difference between c++ and turbo c++?