Introduction of C

                          C is one of the popular programming language developed by Dennis Ritchie at AT&T Bell laboratories at USA in 1972. It is upgraded version of B and BCPL [Basic Command Programming Language], which were also developed at Bell laboratories. C is neither  low level language nor a high level language; it is said to a middle level language because it performs the task of both the languages. Using C, we can code for Application programs, Operating systems and Assemblers.

  • C,s character set
  • Identifier and Keywords
  • Rules to write identifier names in c
  • Data types,type qualifiers and type modifiers
  • Declaration Statement
  • Difference B/W Declaration and Definition
  • Length and Range of Various Data types
  • I-Value and R- Value Concept
  • Variable and Constants
  • Classification of Constant
  • Structure of C Program
  • Process of Compiling and Executing a C program
  • Write Simple C Program
  • Using Prinf and Scanf Function
  • Use of Sizeof Operator

 

Character set of C:

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

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)

 
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

Leave a comment