Constants in C
-
Upload
prabhu-govind -
Category
Education
-
view
23 -
download
4
description
Transcript of Constants in C
![Page 1: Constants in C](https://reader036.fdocuments.net/reader036/viewer/2022082915/548b68eeb479596f608b49fa/html5/thumbnails/1.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022082915/548b68eeb479596f608b49fa/html5/thumbnails/2.jpg)
Constants
![Page 3: Constants in C](https://reader036.fdocuments.net/reader036/viewer/2022082915/548b68eeb479596f608b49fa/html5/thumbnails/3.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022082915/548b68eeb479596f608b49fa/html5/thumbnails/4.jpg)
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