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
What will happen if a pointer is deleted twice?
Is facebook written in c++?
What is the best c++ compiler?
What is the purpose of extern storage specifier?
Write a function that swaps the values of two integers, using int* as the argument type?
Is java easier than c++?
How does c++ sort work?
What relational operators if statements in c++?
how to access grid view row?
What is the use of main function in c++?
How does code-bloating occur in c++?
Why c++ is better than c language?
Which is not an ANSII C++ function a) sin() b) tmpnam() c) kbhit()
Describe new operator?
Write a program that takes a 5 digit number and calculates 2 power that number and prints it.