What is size of null class?

Answers were Sorted based on User's Feedback



What is size of null class?..

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

What is size of null class?..

Answer / vinay bondade

1 byte

Is This Answer Correct ?    15 Yes 3 No

What is size of null class?..

Answer / sourisengupta

One byte.

Is This Answer Correct ?    11 Yes 0 No

What is size of null class?..

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

What is size of null class?..

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

What is size of null class?..

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

Post New Answer

More C++ General Interview Questions

I want explanation for this assignment: how to connect mysql database using c/c++,please explain this detailly?

0 Answers  


Describe linked list using C++ with an example.

0 Answers  


Is swift a good first language?

0 Answers  


Find out the bug in this code,because of that this code will not compile....... #include <iostream> #include <new> #include <cstring> using namespace std; class balance { double cur_bal; char name[80]; public: balance(double n, char *s) { cur_bal = n; strcpy(name, s); } ~balance() { cout << "Destructing "; cout << name << "\n"; } void set(double n, char *s) { cur_bal = n; strcpy(name, s); } void get_bal(double &n, char *s) { n = cur_bal; strcpy(s, name); } }; int main() { balance *p; char s[80]; double n; int i; try { p = new balance [3]; // allocate entire array } catch (bad_alloc xa) { cout << "Allocation Failure\n"; return 1; }

2 Answers   Impetus,


Why do we use pointers in c++?

0 Answers  






What do you mean by ‘void’ return type?

0 Answers  


Who discovered c++?

0 Answers  


What are keywords in c++?

0 Answers  


Should the member functions which are made public in the base class be hidden?

0 Answers  


What do you mean by persistent and non persistent objects?

1 Answers  


What is insertion sorting?

0 Answers  


Is there a datatype string in c++?How is the memory allocation?

3 Answers  


Categories