c语言:输出(Welcome??)和(Welcome\?\?)
程序员文章站
2022-06-22 12:06:07
程序1:
#include
int main()
{
printf("(welcome??)");
retu...
程序1:
#include<stdio.h>
int main()
{
printf("(welcome??)");
return 0;
}
结果:
(welcome]
press any key to continue
错误在于应该使用\?,防止被解析成三字母词,正确程序如下:
程序2:
#include<stdio.h>
int main()
{
printf("(welcome\?\?)");
return 0;
}
结果:
(welcome??)
press any key to continue
程序3
#include<stdio.h>
int main()
{
printf("(welcome\\?\\?)");
return 0;
}
结果:
(welcome\?\?)