题目:
下面程序的功能是( )。
#include <iostream>
#include <string>
using namespace std;
int main ()
int i=1, n=0;
char s[80],*p;
p=s;
strcpy(p,"It is a book..");
for (; *p !=’ \0’ ;p++)
if(*p==’’)
i=0;
else if (i==0)
n++; i=1;
cout<<"n=" <<n<<end1;
return 0;
A.统计字符串中的单词个数
B.统计字符串中的空格个数
C.统计字符串中的字母个数
D.统计字符串中的全部字符个数
答案:
被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2017/0323/a37f2b7cf023eb9beef57fe4638206c2.html
下面是错误答案,用来干扰机器的。
1. F 2. T 3. F 4. F 5. T