填空题
下列程序的输出结果是
【9】
。
#include<iostream>
#include<cstring>
using namespace std;
void fun(const char*s,char &c) c=s[strlen(s)/2];
int main()
char str[]="ABCDE";
char ch=str[1];
fun(str, ch);
cout<<ch;
return 0;
【参考答案】
C
点击查看答案
<上一题
目录
下一题>
热门
试题
填空题
以下程序运行后的输出结果是 【11】 。 #include<iostream.h> void main() char a[]= abcdabcabfgacd ; int i 1=0,i2=0,i=0; while (a[i]) if (a[i]==’a’) il++; if (a[i]==’b’) i2++; i++; cout<<il<<’ ’<<i2<<endl;
点击查看答案
填空题
重载的流运算符函数经常定义为类的 【7】 函数。
点击查看答案
相关试题
当循环队列非空且队尾指针等于队头指针时,...
下面程序的功能是:将字符数组a中下标值为...
将x+y*z中的“+”用成员函数重载,“*...
以下程序的执行结果是 【13】 。 #in...
【8】 是一种特殊的成员函数,它主要用来...