• 从键盘上输入XXYYZZXYZWXP和X,以下程序的输出结果是【 】。

    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)=ch)count++;
    pos--;
    }
    cout<<"count="<<count;
    }

    正确答案:count=4count=4
  • 2021年07月15日 22时34分来自  问答库 >> 计算机类
  • 评论 0
  • 手机玩微博

    手机版 手机端
    Powered by 日新微博 © 2018 - 2020 日新网