C Programing by Ismile
C Programing by Ismile
SUBMITTED TO : SUBMITTED BY :
DR. KAMLESH MAM ISMILE
General Aspect of ‘C’
C WAS ORIGINALLY DEVELOPED IN THE 1970S, BY
DENNIS RITCHIE AT BELL TELEPHONE LABORATORIES,
INC.
C IS A HIGH LEVEL , GENERAL –PURPOSE STRUCTURED
PROGRAMMING LANGUAGE. INSTRUCTIONS OF C
CONSISTS OF TERMS THAT ARE VERY CLOSELY SAME TO
ALGEBRAIC EXPRESSIONS, CONSISTING OF CERTAIN
ENGLISH KEYWORDS SUCH AS IF, ELSE, FOR ,DO AND
WHILE
C CONTAINS CERTAIN ADDITIONAL FEATURES THAT
ALLOWS IT TO BE USED AT A LOWER LEVEL , ACTING AS
BRIDGE BETWEEN MACHINE LANGUAGE AND THE HIGH
LEVEL LANGUAGES.
THIS ALLOWS C TO BE USED FOR SYSTEM
PROGRAMMING AS WELL AS FOR APPLICATIONS
PROGRAMMING
The Character set of ‘C’
C LANGUAGE CONSIST OF SOME CHARACTERS SET, NUMBERS
AND
SOME SPECIAL SYMBOLS. THE CHARACTER SET OF C CONSIST OF
ALL THE ALPHABETS OF ENGLISH LANGUAGE. C CONSIST OF
ALPHABETS A TO Z, A TO Z
NUMERIC 0,1 TO 9
SPECIAL SYMBOLS {,},[,],?,+,-,*,/,%,!,;,AND MORE
THE WORDS FORMED FROM THE CHARACTER SET ARE BUILDING
BLOCKS OF C AND ARE SOMETIMES KNOWN AS TOKENS. THESE
TOKENS REPRESENT THE INDIVIDUAL ENTITY OF LANGUAGE. THE
FOLLOWING DIFFERENT TYPES OF TOKEN ARE USED IN C
1) IDENTIFIERS 2)KEYWORDS 3)CONSTANTS
4) OPERATORS 5)PUNCTUATION SYMBOLS
Identifiers
Integer constants
A integer constant is a numeric constant (associated
with number) without any fractional or exponential part.
There are three types of integer constants in C
programming:
Floating-point constants
A floating point constant is a numeric constant that
has either a fractional form or an exponent form.
For example: 2.0,0.0000234,-0.22E-5
Character constants
A character constant is a constant which uses
single quotation around characters. For example:
'a', 'l', 'm', 'F'
String constants
String constants are the constants which are
enclosed in a pair of double-quote marks. For
example: "good" ,"x","Earth is round\n"
Escape Sequences
Sometimes, it is necessary to use characters which cannot be typed or has
special meaning in C programming. For example: newline(enter), tab,
question mark etc. In order to use these characters, escape sequence is
used.
For example: \n is used for newline. The backslash ( \ ) causes "escape"
from the normal way the characters are interpreted by the
compiler.Escape
Sequences Character
\b Backspace
\f Form feed
\n Newline
\r Return
\t Horizontal tab
\v Vertical tab
\\ Backslash
\' Single quotation mark
\" Double quotation mark
\? Question mark
\0 Null character
Operators in C:An operator is a symbol which operates on a
value or a variable. For example: + is an operator to perform addition.