What is size of null class?
Answers were Sorted based on User's Feedback
Answer / alka
1 byte,whether class won't take any member variable, when
it will loaded into memory object will create which must
take minimum 1 byte of memory.... b'coz minimum size of
memory at least 1 byte
| Is This Answer Correct ? | 21 Yes | 3 No |
Answer / divyachinnamaru
Eg :
class A // empty class
{
};
int main()
{
cout<<"size of class is "<<sizeof(A)<<endl;
return 0;
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / chethu
can somebody explain what is null class? i cudnt find any
thing abt it in net... pls explain with example
| Is This Answer Correct ? | 0 Yes | 3 No |
Answer / purva
the size of null class is zero...
thats why it is called null class because after it nothing
can be accessed in a device..
therefore we have to chech overflow or may be underflow
conditions..
| Is This Answer Correct ? | 1 Yes | 19 No |
Tell me an example where stacks are useful?
What is a base class?
Difference between a copy constructor and an assignment operator.
Can a constructor throw a exception? How to handle the error when the constructor fails?
What is a down cast?
Write a C++ program that asks the user to choose a number between 1 and 1000. Then, your program should be able to guess the number by asking the user no more than 10 yes/no questions. Use a while loop in your program
What is the difference between the indirection operator and the address of oper-ator?
What do c++ programmers do?
what is the diff b/n c and c++ a. dynamic scoping b. nested switching c. declaration of variables in any code block d. separation of compilation and linking
How delete [] is different from delete?
How many types of modularization are there in c++?
What is abstract class in c++?