问答题

简答题

输入一行字符,统计其中有多少个单词,单词之间用空格分隔开。

【参考答案】

(1)get(string);改成gets(string)
(2)printf("there are% d words in the line.\n",word)改成(printf("there are% d words in the line.\n",num)

热门 试题