, :
#include <stdio.h>
const char* escaped(int ch) {
switch (ch) {
case '\t': return "tab";
case '\n': return "newline";
case '\r': return "carriage return";
default: return "not escaped";
}
}
int main()
{
char b = 0;
printf("Enter any character to print it ASCII value : ");
scanf("%c", &b);
printf("The ASCII value of '%c' is %d and is also known as: %s\n", b, b, escaped(b));
}
, , , . "\ t". "\ t" 2 : "\" "t".
escape- - , C.
, "try" C, : , : "\ try", , , , : ryin g.
, "\ t", scanf stdin, , , ( escape-)
Enter any character to print it ASCII value : \t
The ASCII value of '\' is 92 and is also known as: not escaped
't' , .
scanf "\ t" , \, t. .
. , backspace, \b 8. scanf, , , . , , .
: https://en.wikipedia.org/wiki/Escape_character