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 / sandeep mannarakkal
Static is independent of object but associated with class, i.e size of the object is independent of the static.
so here answer is 16 byes.(with the assumption of structure padding is available.)
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What does extern mean in a function declaration in c++?
What is c++ hiding?
What should main() return in c and c++?
Assume studentNames and studentIDs are two parallel arrays of size N that hold student data. Write a pseudocode algorithm that sorts studentIDs array in ascending ID number order such that the two arrays remain parallel.
Why is polymorphism useful?
Tell me an example where stacks are useful?
Explain the use of this pointer?
Explain abstraction.
What is the last index number in an array of 100 characters a) 100 b) 99 c) 101
What is the use of setfill in c++?
Why is "using namespace std;" considered bad practice?
Does c++ have foreach?
What are the general quetions are in DEna bank manager IT/System interviews?
Explain what are accessor methods?
Which bit wise operator is suitable for turning off a particular bit in a number?