+ 1

Why does c++ have type modifiers?

16th May 2018, 4:05 PM
jahnavi mantripragada
jahnavi mantripragada - avatar
2 Answers
+ 6
C++ Modifier Types. C++ allows the char, int, and double data types to have modifiers preceding them. A modifier is used to alter the meaning of the base type so that it more precisely fits the needs of various situations. The modifiers signed, unsigned, long, and short can be applied to integer base types. https://www.tutorialspoint.com/cplusplus/cpp_modifier_types.htm
16th May 2018, 4:11 PM
Scooby
Scooby - avatar
+ 3
bcause, modifiers gives the data types more memory to keep values signed, unsigned, short , long example _------------_ if 16 bits gives to int signed int gives 32 bits so it doubles unsigned int gives -16 to +16 bits
16th May 2018, 4:16 PM
Rajeeb