Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> การเขียนโปรแกรม C

Escape Sequences ในภาษา C

Escape Sequence: Backslash (\) + ตัวอักษร = ความหมายพิเศษ

Sequenceคำอธิบาย
\tTab
\bBackspace
\nNewline
\rCarriage Return
\fForm Feed
\'Single Quote
\"Double Quote
\\Backslash

ตัวอย่าง

char ch1 = '\t', ch2 = '\n';
printf("Test for tabspace %c and a newline %c will start here", ch1, ch2);