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 rust better than c++?
Carry out conversion of one object of user-defined type to another?
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create
Is it possible for the objects to read and write themselves?
What are the two types of polymorphism?
What are the benefits of pointers?
What is enum class in c++?
Name the debugging methods that are used to solve problems?
Is arr and &arr are same expression for an array?
What is the use of pointer in c++ with example?
Does c++ have arraylist?
What are shallow and deep copies?
When does a name clash occur in c++?
Why is c++ awesome?
What is the use of lambda in c++?