constants in c

4
Identifiers: Identifiers are user defined names of variables, functions and arrays. Lower case is commonly used. Constants : Constants have fixed values that don’t change during execution of a program. constants are of two types: 1.Numeric constants 2.character constants Identifiers and Constants

Upload: prabhu-govind

Post on 13-Dec-2014

23 views

Category:

Education


4 download

DESCRIPTION

Constants in C For S-Teacher

TRANSCRIPT

Page 1: Constants in C

Identifiers: Identifiers are user defined names of

variables, functions and arrays.Lower case is commonly used.Constants :

Constants have fixed values that don’t change during execution of a program.

constants are of two types:1.Numeric constants2.character constants

Identifiers and Constants

Page 2: Constants in C

Constants

Page 3: Constants in C

Backslash character constants:Each one represents one character although it

consists of two characters.These character combination are known as escape

sequence which are used in output functions.‘\a’ audible alert.There are 12 escape sequence characters:

Some of them are,1.’\b’ – backspace2.’\f’ – form feed

Escape Sequences

Page 4: Constants in C

BACKSLASH CHARACTERS ARE,1. ‘\a’ Audible alert (bell)2. ‘\b’ Back space3. ‘/f’ Form feed4. ‘/n’ New line5. ‘/r’ Carriage return6. ‘/t’ Horizontal tab7. ‘/v’ Vertical tab8. ‘/’ Single quote9. “/” Double quote10. ‘/?’ Question mark11. ‘//’ Back slash12. ‘/0’ Null