c语言:输出(Welcome??)和(Welcome\?\?)

程序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\?\?)

 

 

             Press any key to continue


你可能感兴趣的:(c语言:输出(Welcome??)和(Welcome\?\?))