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

Which one is better- macro or function?

644


what kind of projects are suitable for c and c++

616


How do you add an element to a set in c++?

547


which of the following is not an secondary constant a) array b) real c) union

1252


How to declare a pointer to an array of integers?

640






Is nan a c++?

606


Is c the same as c++?

557


Is rust better than c++?

594


How does c++ sort work?

553


What is istream and ostream in c++?

588


Which operator cannot overload?

536


describe private access specifiers?

631


Can a built-in function be recursive?

576


Write some differences between an external iterator and an internal iterator? Describe the advantage of an external iterator.

607


Is dev c++ free?

607