Backslash (\) นำหน้าตัวอักษร เพื่อแทน special characters (escape sequences)
ตาราง Escape Sequences
| Character | ความหมาย |
|---|---|
| \a | Alert (beep) |
| \b | Backspace |
| \f | Form feed |
| \n | Newline (บรรทัดใหม่) |
| \t | Horizontal tab |
| \r | Carriage return |
| \v | Vertical tab |
| \\ | Backslash \ |
| \' | Single quote ' |
| \" | Double quote " |
| \? | Question mark ? |
โปรแกรมตัวอย่าง
#include <stdio.h>
#define PI 3.14
float area;
void main() {
double r = 1.0;
area = PI * r * r;
printf("Area is %f \n", area); // \n = newline
}
ผลลัพธ์
Area is 3.140000