World Languages, asked by adhaliwal3966, 1 year ago

What is the data type that occupies the least storage space that can c language

Answers

Answered by Shaizakincsem
1

The nearest C++ has to an information compose that consumes little or no space is void. In any case, void is anything but a general kind, in spite of the fact that I hear there is a proposition in C++20 to move void toward this path.

Numerous C++ ABIs actualize an enhancement known as the Empty Base Optimization. As the name proposes, this influences legacy. In particular: If you have a vacant base class, it is permitted to possess zero space in a determined class' format. To be clear however, the inferred class still should be non-zero in the size.

Answered by topanswers
6

C is associated with different data types to each variable and occupies different amount of memory.  

The char data type is used to store a single character and is the most basic data type in C.  

It requires only one byte of memory for storage and can contain both positive and negative values.

There are also other datatypes which occupy one byte of memory.

They are,

  • Bool
  • Unsigned Char
Similar questions