How size of a class can be calulated?
Answers were Sorted based on User's Feedback
Answer / spoorthi.hebbar
THE SIZE OF THE ATTRIBUTES OF CLASS IS THE ANSWER..
EG.
CLASS DEMO
{
INT A; //IT IS 4 BYTES LONG
INT B; //IT IS 4 BYTES LONG
}
THE TOTAL SIZE IS 8 BYTES.
Is This Answer Correct ? | 8 Yes | 2 No |
Answer / 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 |
Can a built-in function be recursive?
Do you know about C++ 11 standard?
0 Answers Agilent, ZS Associates,
In a function declaration what does extern means?
What is flush programming?
Is c# written in c++?
Can we remove an element in a single linked list without traversing? Lets suppose the link list is like this 1 2 3 4 5 6 We need to remove 4 from this list (without traversing from beginning) and the final link list shud be 1 2 3 5 6 only thing we know is the pointer to element "4". How can we remove "4" and link "3" to "5"?
What is the difference between public and private data members?
What is an arraylist c++?
What is a storage class? Mention the storage classes in c++.
What is an inline function in c++?
What is data structure in c++?
What is the best it certification?