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
Is it possible to provide special behavior for one instance of a template but not for other instances?
When is the copy constructor called?
What is a local variable?
How do I use arrays in c++?
What is setfill c++?
Is there any function that can skip certain number of characters present in the input stream?
How to declare an array of pointers to integer?
Can comments be nested?
What is oops in c++?
How do you instruct your compiler to print the contents of the intermediate file showing the effects of the preprocessor?
What is searching?
Differentiate between the message and method in c++?
Is swift better than c++?
What are the data types in c++?
How java is different from c and c++?