6

Click here to load reader

Escape sequence in c part 1

Embed Size (px)

Citation preview

Page 1: Escape sequence in c   part 1

वन व न व व न ग न आ

gate . ग ग . व

, groundsman, security person, व न व व

VIP ज ग ज .

ज . आ

व ग व व ग .

व न C escape sequence ज . definition

“Escape from the normal meaning of following character after slash ( \ )”

आ . ज आ ग आ ( \ ) न ग ग ज

न meaning ज आ न व …

नव न व back slash ( \ ) वज forward slash ( / ) व न escape

sequence ( / ) व back slash व . - न व

ज न ज . /n ज printf statement आ व

न ज .

Page 2: Escape sequence in c   part 1

फ statement \n व . आ व n ज a to z alphabet आ .

slash ग ग ज आ ( ज ) n न treat न treatment

न cursor next न न आ . व t ज ग ग आ t

न treat न cursor tab न न व ग .

व न , व output व व input cursor

न escape sequence व ज .

C language न escape sequences आ . \n आ \t न व व .

ज न escape sequence आ न

. escape sequence ASCII standard न decimal आ Hex values . ज

Bell escape sequence (\a)

फ व back slash न a व न

न . Machine booting व ग न ज alert

Page 3: Escape sequence in c   part 1

. न a व आ . न व . व न व dos

based . व user input alert फ \a व .

Back Space Escape Sequence (\b)

b character back space न आ . फ \b escape

sequence space backward direction न व ज . line

व ज \b display device behavior unspecified . escape

sequence व ग ग न output print न ज cursor ग आ

ग situations आ .

Carriage Return Escape Sequence (\r)

Carriage return ज \r function keyboard व home key function आ व .

line व cursor आ Home key cursor न line व न न व

ज आ . Type Writer ज Cartridge Return व न

आ . Device reset Cartridge return . Carriage return Line feed आ

New Line जव आ . \r (CR) आ line feed (LF) combination ज new

line ( \n ) control character आ . Computers Characters bold/strike out/underscore

Carriage return व ग आ . .

Page 4: Escape sequence in c   part 1

व \r व व escape sequence (line व cursor न ) आ

terminal emulator …! न ज व override ज

. न ज .

Back slash Escape Sequence ( \ )

File handling आ file open file path व ग ज न operating system

path व file आ न . ज file path

c:\newprograms\recursion\ fibonacci.c

आ . आ file open

fp = fopen(“c:\newprograms\recursion\ fibonacci.c”, “r”);

statement file not found message . \newprograms

वज OS ewprograms directory , \recursion वज \ecursion sub directory

, \fibonacci.c वज ibonacci.c file \n, \r, \f व escape

sequence न treat . न आ escape sequence ग न व

Page 5: Escape sequence in c   part 1

व string back slash escape sequence व न OS ग back

slash ग न ज back slash आ escape sequence व न (ज normally

treat ) आ treat … न ज file open function

fp = fopen(“c:\\newprograms\\recursion\\ fibonacci.c”, “r”);

OS ज string

c:\newprograms\recursion\ fibonacci.c

ज .

Double Quotes and Single Quote Escape Sequence ( “ ), ( ‘ )

Interview “Welcome to C Programming” न व print

ग . व

printf(“Welcome to C Programming\n”);

न . output double quotes pair व आ . आ ज

printf(“”Welcome to C Programming”\n”);

modify न ....!

व escape sequence व न व output . फ modify .

printf(“\”Welcome to C Programming\”\n”);

Just type and run interesting program to know the relation between escape sequences and

corresponding Hex values

Page 6: Escape sequence in c   part 1

Here is one more small animation in C just by using \r escape sequence.