填空题

执行以下程序后,输出“#”号的个数是 【14】 。
#include<iostream.h>
main()

int i,j;
for(i=1;i<5;i++)
for(j=2;j<=i;j++)
cout<’#’;

【参考答案】

F
<上一题 目录 下一题>
热门 试题

填空题
阅读以下程序: #include<iostream.h> void main() static int a[][3]=9,7,5,3,1,2,4,6,8; int i,j,s1=0,s2=0; for(i=0;i<3;i++) for(j=0;j<3;j++) if(i==j)s1=sl+a[i][j]; if(i+j==2)s2=s2+a[i][j]; cout<<s1<< , <<s2<<endl; 则该程序的输出结果为 【15】 。
填空题
若有如下程序段: #include<iostream> using namespace std; int main() char *p= abcdefgh ,*r; long *q; q=(long*)p;q++; r=(char*)q; cout<<r<<endl; return 0; 该程序的输出结果是 【10】 。
相关试题
  • 类MyClass的定义如下: class MyClass p...
  • 假定MyClass为—类,执行MyClass a[3]...
  • 若有以下定义: int a[]=1,2,3,...
  • 下列关于指针的运算中,( )是非法的。
  • 下列叙述中,不属于软件需求规格说明书的作...