Empty structure ki size 1 byte hoti h kyu

12/12/2019 6:39:08 PM

Badal Kushwah

1 Answer

New Answer


For those who do not understand the question is why is the size of an empty structure is 1. Ans. In C size of empty structure is 0. In C++ it was a design decision to have the sizeof an empty class to be 1. A structure is a class in C++.