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 is the type of 'this' pointer?
Can constructor be static in c++?
What header file is needed for exit(); a) stdlib.h b) conio.h c) dos.h
What do you mean by global variables?
What is split a string in c++?
Can we get the value of ios format flags?
Show the declaration for a static member variable.
Can comments be nested?
Where and why do I have to put the "template" and "typename" keywords?
what is the difference between overloading & overriding? give example.
In a function declaration what does extern means?
What is array give example?
How much maximum can you allocate in a single call to malloc()?
Will the following program execute?
How would you differentiate between a pre and post increment operators while overloading?