填空题
下列程序的运行结果为
【9】
。
#include<iostream, h>
void main( )
int i;
for(i=1; i<6;i++)if(i==3) break:
com<<"i="<<i<<end1;
【参考答案】
i=3
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
填空题
下列程序中的this指针的作用是 【13】 。 #include <iostream. h> class Sample int n; static int st; public, Sample() Sample(int m) n=m; st=m+10; void Change(int k) st=st+k; void AddValue(int m) Sample s, s. n=n+m; *this=s; void disp( ) cout<< n= <<n<< ;st= <<st<<end1; ; int Sample: :st=0 void main() Sample s1(10),s2(10) s1. disp() s1. AddValue(5), s2. Change(100); s1. disp(); s2. disp()
点击查看答案&解析
填空题
执行 cout<<char(’A’+2)<<end1; 语句后得到的输出结果为 【6】 。
点击查看答案&解析
相关试题
下列程序的运行结果是 【15】 。 #in...
下列程序的运行结果为 【14】 。 #in...
在下面的类定义中,this指针的用途是 【1...