Answer Posted / hitesh sojitra
When you calculate the size of a empty class that time you can c it takes 1 byte.which is the size of a char which a compiler takes for storing the address of a empty class.
The size of an empty class would depend on what is the range specified for the compiler for char. It takes that much space to store the address of a class.
Is This Answer Correct ? | 13 Yes | 1 No |
Post New Answer View All Answers
When should we use container classes instead of arrays?
Which is the best c++ software?
What is difference between array and vector in c++?
What is the limitation of cin while taking input for character array?
Write a c program for binary addition of two 8 bit numbers.
What is pure virtual function?
What is c++ flowchart?
Is c++ fully object oriented?
What is the error in the code below and how should it be corrected?
Write a program which is required to process the time of a clock in hours and minutes, entered from the keyboard. With this program, there are two requirements for any data entered by a user: 1. The data must be of the correct type (in this case, two ints). 2. The data must be in the correct range: this means that, for the minutes, negative numbers and any number above 59 must be rejected; for the hours, negative numbers and any number above 23 must be rejected. Output error message for invalid data input. Output the time one and a half hour after the time input. i.e. Hour: 22 Min: 32 One and a half hour after 22:32 is 00:02
Differentiate between a template class and class template in c++?
Are strings immutable in c++?
Can the creation of operator** is allowed to perform the to-the-power-of operations?
What are the defining traits of an object-oriented language?
What is an undefined reference/unresolved external symbol error and how do I fix it?