Loading...
Loading...
Loading Curriculum...
Loading Subject...
Loading Topic...
Loading Lesson...
Loading Lab...
Type modifiers alter the storage size and range of basic data types. They let you optimize memory or increase capacity as needed.
signedCan hold negative & positivesigned int x = -5;unsignedOnly non-negative values (doubles range)unsigned int x = 50000;shortReduces storage (2 bytes)short int x = 100;longIncreases storage (4-8 bytes)long int x = 100000;long longMaximum integer storage (8 bytes)long long x = 1e18;short2B-32,768 to 32,767int4B-2.1B to 2.1Blong4B-2.1B to 2.1Blong long8B±9.2 × 10¹⁸unsigned int4B0 to 4.29B