下面程序的功能是( )。
#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;
题库:计算机等级考试
类型:最佳选择题
时间:2017-07-03 15:13:20
免费下载:《单选题》Word试卷
下面程序的功能是( )。
#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.统计字符串中的全部字符个数
本题关键词:面试程序,功能改进顺序,平面功能分区,面肌运动功能,功能程度分类,口面部功能训练,下丘脑功能退化,肾上腺功能低下,地面节能工程,屋面节能工程;