How to print ASCII value of 2 characters?

Viewed 2461

I'm trying to print ASCII value of "\t" i.e escape sequence. But my program only prints the ASCII value of "\" i.e ASCII value will be 92. Is there any way to print ASCII value of 2 characters ? Help would be really appreciated.I have included my code below.

#include<stdio.h>

main()

{

    char b=0;

    printf("Enter any character to print it's ASCII value : ");

scanf("%c",&b);

printf("The ASCII value of '%c' is %d",b,b);

return 0;

}
3 Answers
Related