Answer Posted / shweta iyer
Size of a class can be calculated by adding up the size of all its data members.
For example:
class student
{
char name[20]; -----> 4*20=80
int rollno[5]; -----> 2*5=10
......
}
So size of class student is 80+10=90.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is a vector c++?
What is jump statement in C++?
What are exceptions c++?
What does count ++ do in c++?
What is a binary file? List the merits and demerits of the binary file usagein C++.
How do I exit turbo c++?
What is meaning of in c++?
What is function overloading in C++?
State the difference between delete and delete[].
What is a c++ class?
What are vectors used for in c++?
What is the difference between *p++ and (*p)++ ?
How is static data member similar to a global variable?
Is dev c++ free?
Tell me can a pure virtual function have an implementation?