Computer Science, asked by dikshantjayant2648, 1 year ago

What is tge data type that occupies the least storage space in c language?

Answers

Answered by writersparadise
2

There are different data types in C associated 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 the same memory of one byte.

  • Bool
  • Unsigned Char

Read more on Brainly.in - https://brainly.in/question/5402643

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.


Similar questions