C Programming Language
  • Home
  • C Fundamentals
    • C Character Set
    • Tokens>
      • Keywords
      • Identifiers
      • Constants>
        • Definition and Its types
        • Numeric Constants>
          • Integer Constants
          • Real Constants
        • Character Constants
        • String Constants
        • Backslash Character
      • Operators>
        • Definition and Its types
        • Arithmetic
        • Relational
        • Logical
        • Increment
        • Decrement
        • Assignment
        • Arithmetic Assignment
        • Conditional
        • Bitwise
        • Special Operators
        • Hierarchy
    • Data Types>
      • Primary (Or) Basic
      • User-Defined
      • Derived
    • Variable>
      • Definition
      • Declaration
      • Initialization
  • Control Structures
    • Decision-Control>
      • If Statement>
        • Simple-if Statement
        • if-else Statement
        • Nested-if Statement
        • if-else ladder Statement
      • Switch Statement
    • Loop Control>
      • For
      • While
      • Do-While
  • Arrays
    • Introduction
    • Single-Dimensional>
      • Definition
      • Declaration
      • Initialization
    • Two-Dimensional>
      • Definition
      • Declaration
      • Initialization
    • Multi-Dimensional>
      • Definition
      • Declaration
      • Initialization
  • Functions
    • Definition
    • Standard Library Character Functions
    • Standard Library String Functions
    • Storage Classes>
      • Definition
      • Automatic
      • Register
      • Static
      • External
  • Pointers
  • Files
    • Concepts
    • Data Files and its Categories
    • Standard Files and its Categories
  • University Questions
    • April 2001 To 2005
    • April 2006 To 2010
    • April 2011 To 2015
    • November 2001 To 2005
    • November 2006 To 2010
    • November 2011 To 2015

Character set of C

character:-          It denotes any alphabet, digit or special symbol used to represent information.

Use:-                      These characters can be combined to form variables. C uses constants, variables, operators, keywords and expressions as building blocks to form a                                     basic C program.

Character set:-    The character set is the fundamental raw material of any language and they are used to represent information. Like natural languages, computer                                             language will also have well defined character set, which is useful to build the programs.

The characters in C are grouped into the following two categories:

1.      Source character set
                                a.      Alphabets
                                b.      Digits
                                c.      Special Characters
                                d.      White Spaces

2.      Execution character set
                                a.     Escape Sequence

Source character set

ALPHABETS
            Uppercase letters                 A-Z
            Lowercase letters                 a-z

DIGITS                                                  0, 1, 2, 3, 4, 5, 6, 7, 8, 9

SPECIAL CHARACTERS

 ~          tilde                            %         percent sign               |           vertical bar         @        at symbol               +          plus sign                    <          less than

_          underscore                -           minus sign                 >          greater than       ^          caret                        #          number sign              =          equal to

&         ampersand                 $          dollar sign                 /           slash                  (           left parenthesis      *          asterisk                      \           back slash

)           right parenthesis       ′           apostrophe                :           colon                  [           left bracket               "          quotation mark         ;           semicolon

]           right bracket              !           exclamation mark     ,           comma                { left flower brace               ?            Question mark       .           dot operator           

}            right flower brace    

WHITESPACE CHARACTERS

\b         blank space               \t          horizontal tab                       \v         vertical tab             \r         carriage return          \f         form feed                   \n         new line
       
\\          Back slash                 \’         Single quote                          \"         Double quote       \?         Question mark          \0         Null                            \a         Alarm (bell)

Execution Character Set

Certain ASCII characters are unprintable, which means they are not displayed on the screen or printer. Those characters perform other functions aside from displaying text. Examples are backspacing, moving to a newline, or ringing a bell.

They are used in output statements. Escape sequence usually consists of a backslash and a letter or a combination of digits. An escape sequence is considered as a single character but a valid character constant.

These are employed at the time of execution of the program. Execution characters set are always represented by a backslash (\) followed by a character. Note that each one of character constants represents one character, although they consist of two characters. These characters combinations are called as escape sequence.

                                    Backslash character constants

Character                      ASCII  value    Escape Sequence             Result

Null                                          000                   \0                                    Null

Alarm (bell)                            007                  \a                                    Beep Sound

Back space                            008                  \b                                   Moves previous position

Horizontal tab                        009                  \t                                    Moves next horizontal tab

New line                                 010                  \n                                   Moves next Line

Vertical tab                             011                  \v                                   Moves next vertical tab

Form feed                              012                  \f                                    Moves initial position of next page

Carriage return                     013                  \r                                    Moves beginning of the line

Double quote                       034                   \"                                    Present Double quotes

Single quote                         039                   \'                                    Present Apostrophe

Question mark                     063                   \?                                  Present Question Mark

Back slash                            092                   \\                                   Present back slash

Octal number                       \000                           

Hexadecimal number        \x 

Powered by Create your own unique website with customizable templates.