Header Ads

2.0 - Key Words Types


'C' - Keyword's
  • In programming, a keyword is a word that is reserved by a program because the word has a special meaning.
  • Keywords can be commands or parameters
  • Every programming language has a set of keywords that cannot be used as variable names.
  • Keywords are sometimes called reserved names.
'C' - Keyword's Categories/types.
  • Data Types
  • Qualifiers
  • Loop
  • Storage Class
  • Decision
  • Jump
  • Derived
  • User Defined
  • Others

  1. Keywords – Data Types

  • char 

- The basic data type supported for storing characters of one byte size.
  •  int 
- A variable would hold a integer type value
- A simple and efficient type for arithmetic operations
- Usually a word size of the processor although the compiler is free to choose the size.
- ANSI C does not permit an integer, which is less than 16 bits
  • float
- A variable would hold a single precision value
- ANSI C does not specify any representation
  • double
- A variable would hold a double precision value
- The implementations may follow IEEE formats to represent floats and doubles, and double occupies 8-bytes in memory, Supports 0, ∞ (-/+) and NaN
  • signed
- A variable can hold both positive and negative value
- Most Significant Bit (MSB) of the variable decides the sign
  • unsigned
- A variable can hold only positive value
- Larger range of positive values within the same available space
  • short
- Fairly small integer type of value
  • long
- Fairly large integer type of value
NOTE : ANSI C says that the size of short and long implementation defined, but ensures that the non-decreasing order of char, short, int, and long is preserved i.e.,

"char ≤ short ≤ int ≤ long"

No comments