Can you tell me please what is the storage values of all 4 data types and i am also confused in bits and byte

can you tell me please what are the storage values of all 4 data types and I am also confused in bits and byte

hey @garggaurav628, by storage values,you mean ranges of datatypes?

no i mean like char storage value is 1 byte and what about others?

yes bhaiya i mean to say ranges

Hi @garggaurav628
Here is a list of data types with their respective sizes and ranges

Data Type Memory Size Range
char 1 byte -127 to 127 or 0 to 255
int 4 bytes -2147483648 to 2147483647
long int 4 bytes -2,147,483,648 to 2,147,483,647
float 4 bytes +/- 3.4e +/- 38 (~7 digits)
double 8 bytes +/- 1.7e +/- 308 (~15 digits)
long long int 8 bytes -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807

As for the bytes and the bits , 8 bits = 1 byte.
1 bit can only store a 0 or 1. It is the smallest unit of memory. A group of 8 bits is called a byte.

hey @garggaurav628, consider this link once https://codescracker.com/cpp/cpp-modifier-types.htm