Modifiers in c

Modifiers are prefixes of basic data types, which is used to increase or decrease the size of a variable .there are 4 types of modifiers in c

  • short
  • long
  • signed
  • unsigned
  1. short: short is used for fixed memory because different data types occupy differ sizes of memory on different operating system so short is used. default memory of short int is 2 bytes
  2. Long: long is used to increase 2 more bytes from default one .this can be applied to int and double data types .
  3. signed: signed is used to intake both negative and positive values
  4. Unsigned: this accepts only positive values, this keyword is helpful in programmes like “number of days in the year” the answer is 365 but it will not accept -365