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
If dog is a friend of boy, and terrier derives from dog, is terrier a friend of boy?
Explain binary search.
What is difference between c++ 11 and c++ 14?
Which is most difficult programming language?
Write a short code using c++ to print out all odd number from 1 to 100 using a for loop
Do you need a main function in c++?
Write about c++ storage classes?
What is c++ and its features?
What is a float in c++?
How a new element can be added or pushed in a stack?
Is there any difference between int [] a and int a [] in c++?
What is the full form of c++?
What are member functions used in c++?
What are the rules for naming an identifier?
What are the various compound assignment operators in c++?