填空题
从键盘上输入XXYYZZXYZWXP和X,以下程序的输出结果是
[9]
。
#include<iostream.h>
#include<string.h>
void main()
char*str,ch;
int count=0,pos;
cin>>str>>ch;
pos=strlen(str)-1;
while(pos>=0)
if((str[pos])=ch)count++;
pos--;
cout<<"count="<<count;
1、
【正确答案】
1、count=4
【答案解析】
提交答案
关闭