+ 7
A C output
Who does explain me why in C this: printf("\x61"); outputs "a"?
5 odpowiedzi
+ 7
61 is hexadecimal for 97 which is the ascii number of a.
+ 4
printf("%c",0x61); produces the same.
+ 4
\x61 is basically the (6*16+1*1)th ASCII character, which is a
+ 3
escape sequence used
+ 1
Just to add a tiny bit more explanation, the \x pc in front of 61 is what says it’s hexadecimal, rather than just printing the number 61.