Computer Science, asked by avantika70, 11 months ago

the ratio of the memory allocated to int ,float and chat variable in c is ??

Answers

Answered by ankurbadani84
1

Answer:

4:6:1

Explanation:

The ratio of the memory allocated to int:float:char variable in c:- 4:6:1

Integer :- Storage Size 4 bytes :- Values supported -2,147,483,648 to 2,147,483,647

Float :- Storage Size 6 bytes :- Values supported 1.2E-38 to 3.4E+38

Char :- Storage Size 1 byte :- Values supported 0 to 255

So Ratio of int:float:char is 4:6:1.

Answered by lovingheart
1

Answer:

4:6:1  --> int:float:char

Explanation:

Size of int is 4 bytes and accepts values ranging from -2,147,483,648 to 2,147,483,647

Size of float is 4 bytes and accepts values ranging from 1.2E-38 to 3.4E+38

Size of char is 1 byte and accepts values ranging from 0 to 255

Considering the ranges of integer, floating point and char, we can arrive the ratio as 4:6:1

The ratio will differ from language to language because the size of the int, float and char will differ.

Similar questions