+ All Categories
Home > Education > Constants in C

Constants in C

Date post: 13-Dec-2014
Category:
Upload: prabhu-govind
View: 20 times
Download: 4 times
Share this document with a friend
Description:
Constants in C For S-Teacher
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
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


Recommended