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
Mention the storage classes in c++.
What happens when you make call 'delete this;'?
What are static variables?
How do I tokenize a string in c++?
Write about a nested class and mention its use?
What are c++ stream classes?
Define a nested class.
What happens if a pointer is deleted twice?
Is c++ a dying language?
Define the process of handling in case of destructor failure?
How we can differentiate between a pre and post increment operators during overloading?
What is object in c++ example?
Why is null pointer used?
What is a responder chain?
Where and why do I have to put the "template" and "typename" keywords?