This is a string 输入char s[20]; scanf("%s",s);并没有错,但是它只能读入"This",因为scanf("%s",...);遇到空格、Tab、回车即视为读取结束。