1.16 The C Character Set or Characters of lexical set

 The C Character Set or Characters of lexical set: -

  • Character set is a set of alphabets, digits and some special characters that are valid in C language. A program requires all these when designing it.

Alphabets

                        Uppercase: A B C .........................X Y Z

                        Lowercase: a b c ...................... x y z

                    C accepts both lowercase and uppercase alphabets as variables and functions.

 

Digits

                                                    0 1 2 3 4 5 6 7 8 9

 

Special Characters

Special Characters in C Programming

      ,

        < 

         > 

        .

        _

       (

         )

          ;

        $

         :

       %

        [

         ]

         #

        ?

        '

        &

        {

        }

        "

       ^

        !

         *

        /

         |

      -

        \

        ~

      +

 

 White space Characters

  • blank space, new line, horizontal tab, carriage return and form feed.


The following are valid alphabets, numbers and special symbols allowed in C.

 

Alphabets

A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z.

a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z.

Digits

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

Special symbols

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

White space characters

Blank , new line , tab etc.

Popular posts from this blog

1.19 Operators in c programming

2.4 Arrays in c programming

2.1 Control statements in C programming (sequential & conditional)