#include
int main()
{
char c;
printf("please input a char:");
scanf("%c", &c);
if (c == '\n')
printf("\\n");//输出'\'需要用转义序列'\\'
printf("\n");
}
#include"stdio.h"
void main()
{
char x;
scanf("%c",&x);
if(x=='\n')
printf("\\n");
printf("\n");
}
#include
bioskey();
这个函数就可以了 VC 6不支持, VC6 可以用windows消息拦截回车
#include "stdio.h"
void main()
{
char ch;
scanf("%c",&ch);
printf("The ASCII code you have pressed is:%d\nASCII is:%c\n",ch,ch);
}
#include
int main()
{
char a,b;
scanf ("%c",&b);
a=b;
a=110;
printf ("\\%c\n",a);
return 0;
}