c tutorial character set

Bodhak c tutorial character set in this chapter we will learn about Character set of C, C Tokens, Keywords, Identifiers, Constants, Data Types, Operators with syntaxes.

The character set of C language: C uses the uppercase letters ‘A’ to ‘Z’, the lowercase letters ‘a’ to ‘z’, the digits 0 to 9, and certain special characters as building blocks to form basic program elements (constants, variables, operators, expressions, etc.).


c tutorial character set:-

  1.  Alphabets : A, B, C, ….., Y, Z

: a, b, c, ……, y, z

  1.  Digits : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
  2. Special Symbols :

~  `  !  @  #   %  ^  &  *  (  )  _  –  +  = |  \  {  }  [  ]  :  ;   “  ‘  <  >  ,  .   ?  /
C Tokens  :

Keywords, Identifiers, Constants, Data Types, Operators

There are 32 words defined as keywords in C. These have predefined uses and cannot be used for any other purpose in a C program. They are used by the compiler as an aid to compiling the program. They are always written in lower case

Before you can do anything in any language, you must at least know how you name an identifier. An identifier is applied to any variable, function, data definition, etc. In C an identifier is a combination of alphanumeric characters, the first being a letter of the alphabet or an underline character, and the remainder being made up of Combination of letters of the alphabet, numeric digits, or the underscore.

Rules for naming identifiers:-

  1. Identifier name should start with alphabet or underscore(_)
  2. It is combination of alphabets, digits and special character _
  3. It must be length of minimum 1 character and maximum 31
  4. The only underscore is allowed no other special characters are allowed
  5. It should not be keyword

6.It can be in uppercase or lowercase or is combination of both


base        2base    _base      _        base2    t base     int    BAse

The following are the different types of constants.

  1. Integer constants
  2. Real constants or Floating point constants
  3. Single character constants
  4. String constant

An integer constant is an integer-valued number. Thus it consists of a sequence of digits.

Integer constants can be written in three different number system:

  1. a) Decimal
  2. b) Octal
  3. c) Hexadecimal