Quick Print – Computer Sir Ki Class

Login


Lost your password?

Don't have an account ?
Register (It's FREE) ×
  


Shop
siteicon
Solved Problem Solved Problem#JAVA#3962

Problem Statement - Primitive Data Type Sizes

Arrange the following primitive data types in an ascending order of their size:
(i) char (ii) byte (iii) double (iv) int

Solution

The size of given data types are –
(i) char – 16 Bit
(ii) byte – 8 Bit
(iii) double – 64 Bit
(iv) int – 32 Bit
So in the ascending order of size we shall write as follows
byte –  char  –  int  – double