填空题
下列程序的输出结果是______。
#include<iostream.h>
#include<string.h>
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
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
填空题
分析以下程序的执行结果______。 #include<iostream.h> class Sample int x,y; public: Sample()x=y=0; Sample(int a,int b)x=a;y=b;) ~Sample() if(x==y) cout<< x=y <<end1; else cout<< x!=y <<end1; void disp() cout<< x= <<x<< ,y= <<y>>end1; ; void main() Sample s1(2,3); s1.disp();
点击查看答案&解析
填空题
若有: int i=1000; int *p=&i; void*q; q=p; 其中,q=p的含义是______。
点击查看答案&解析
相关试题
对基类数据成员的初始化必须派生类的构造函...
有如下类声明: class MyClass int i;...
下列程序的输出结果为: Object id=0 ...
在下面横线上填上适当的语句,完成程序。 ...