why the size of an empty class is 1

Answer Posted / surender a

Because the fundamental size is a char [viz 1 byte by
default on any 32 bit or 64 bit machine].

Is This Answer Correct ?    5 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a function take variable length arguments, if yes, how?

653


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

1612


What is an incomplete type in c++?

855


Differentiate between an array and a list?

811


Is there a c++ certification?

687






Explain rtti.

669


Write about the retrieval of n number of objects during the process of delete[]p?

659


Why is c++ still best?

641


What is runtime errors c++?

673


Describe public access specifiers?

666


What are the two types of polymorphism?

682


Explain terminate() and unexpected() function?

697


what does the following statement mean? int (*a)[4]

699


A mXn matrix is given and rows and column are sorted as shown below.Write a function that search a desired entered no in the matrix .with minimum complexity 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

3334


Does c++ support exception handling?

696