#include<stdio.h>
main()
{
printf("A\n"); //原样输出
printf("%c\n",'A'); //输出字符'A'
printf("%c\n",65); //以字符的形式输出65,65是A的ASCII码
printf("%s\n","A"); //输出字符串"A"
printf("\101\n"); //转义字符\101,ASCII码八进制数101转换成对应字符A
printf("\x41\n"); //转义字符\x41,ASCII码十六进制数41转换成对应字符A
printf("%c\n",'a'-32); //a的ASCII码比A大32
printf("%c\n",'\101');
printf("%c\n",'\x41');
putchar('A'); //输出一个字符
putchar(65);
putchar('\101');
putchar('\x41');
}
Microsoft Visual C++ 6.0