24
25
26
50
第1题:
执行下列语句段后,输出字符“*”的个数是 for(inti=50;i>1;i-=2)tout<<'*';
A.24
B.25
C.26
D.50
第2题:
执行下列语句段后,输出字符“*”的个数是for(int i=50;i>1;--i)cout<<'*';
A.48
B.49
C.50
D.51
第3题:
下列语句段将输出字符'*'的个数为 int i=100; while(1) { i--;; if(i==0) break; cout<<'*'; }
A.98个
B.99个
C.100个
D.101个
第4题:
有如下程序段:
int i=1:
while(1){
i++;
if(i==210) break;
if(i%2==0) cout<<‘*’;
}
执行这个程序段输出字符*的个数是
A.10
B.3
C.4
D.5
第5题:
执行下列程序后,输出“*”号的个数是______。
include<iostream.h>
main()
{
int i,j;
for(i=1;i<5;i++)
for(j=2;j<=i;j++)
cout<<'*';
}
第6题:
下列语句序列执行后,i的值是( )。 int i=10; do{i-=2;}while(i>6);
A.10
B.8
C.6
D.4
第7题:
下列语句段落将输出字符'*'的个数为( )。#include<iostream.h>Void main(){int i=100;while(1){ i--; if(i==0)break; cout<<'*';}}
A.98个
B.99个
C.100个
D.101个
第8题:
执行下列语句段后,输出字符“*”的个数是( )。 for(int i=50;i>1;i-=2)Cout<<*:
A.24
B.25
C.26
D.50
第9题:
下列语句段将输出字符'*'的个数为( )。 int i=100; while (1) { i--; if (i==0) break; cout<<'*'; }
A.98
B.99
C.100
D.101
第10题:
执行下列语句段后,输出字符“*”的个数是( )。 for(int i=50;i>1;i一=2) tout<<’*’:
A.24
B.25
C.26
D.50
第11题:
下列语句段输出字符'*'的个数为( )。 int i=100; while(1){ i--; if(i==0) break; cout<<'*'; }
A.101个
B.100个
C.99个
D.98个
第12题:
48
49
50
51
第13题:
执行下列语句段后程序的输出结果是______。
int x[]={1,2,3,4,5};
int q=x;
cout<<*(++q)<<end1;
第14题:
以下程序执行时,输出“”号的个数是【 】。
include <iostream.h>
vied main(){
int i, j;
for(i=1;i<5;i++)
for(j=2;j<=i;j++)cout<<‘’;
}
第15题:
有如下循环语句:
for(int i=50;i>20;i-=2) eout<<i<<‘,’;
运行时循环体的执行次数是【 】次。
第16题:
执行下面语句后,输出字符"#"的个数是( )。 for(int i=50;i;--i)cout<<'#';
A.48
B.49
C.50
D.51
第17题:
执行以下程序后,输出“”号的个数是【 】。
include<iostream.h>
main()
{
int i,j;
for(i=1;i<5;i++)
for(j=2;j<=i;j++)
cout<'';
}
第18题:
有如下程序段: inti=1: while(1){ i++: if(i==10)break: if(i%2==0)cout<<*: } 执行这个程序段输出字符*的个数是( )。
A.10
B.3
C.4
D.5
第19题:
执行下列语句段后,输出字符“*”的个数是 for(int i=50;i>1;i-=2)count<'*';
A.24
B.25
C.26
D.50
第20题:
有下列语句序列: int k=0; do{k+=5;cout<<'$';} while(k<19); while(k-->0)cout<<'*'; 执行上面的语句序列输出字符“$”和“*”的个数分别是( )。
A.4和20
B.5和20
C.4和21
D.5和21
第21题:
执行下列语句段后,输出字符“*”的个数是( )。 for(int i=50;i>1;--i) Cout<<*:
A.48
B.49
C.50
D.51
第22题:
下列程序的输出结果为【 】。
include <iostream. h>
void main()
{
char a[]="abcdabcabfgacd";
int i1=0,i2=0,i=0;
while (a[i])
{
if (a[i]=='a') i1++;
if (a[i]=='q') i2++;
i++;
}
cout<<i1<<''<<i2<<end1;
}
第23题:
执行下列语句段后,输出字符“*”的个数是( )。 for(int i=50;i>1;i一=2) tout<<’*’:
A.24
B.25
C.26
D.50