网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
( 29 )下列程序段的输出结果是
ACCEPT TO A
IF A=[123 ]
S= 0
ENDIF
S= 1
? S
A ) 0
B ) 1
C ) 123
D )由 A 的值决定
参考答案
更多 “ ( 29 )下列程序段的输出结果是ACCEPT TO AIF A=[123 ]S= 0ENDIFS= 1? SA ) 0B ) 1C ) 123D )由 A 的值决定 ” 相关考题
考题
有以下程序void swap(char *x,char *y){ char t;t=*x; *x=*y; *y=t;}main(){ char *s1="abc",*s2="123";swap(s1,s2);printf(" % s, % s\n",s1,s2);}程序执行后的输出结果是A)123,abcB)abc,123C)1bc,a23D)321,cba
考题
有如下程序,运行输出的结果是 ______ 。 s=0 Do s=(s+1)*(s+2) n=n+1 Loop Until s>=30 Print n; sA.0 1B.30 30C.4 30D.3 182
考题
执行下列程序段后输出的结果是( )。s = 1For i = 1 To 3For j = 0 To i-1s = s + s * jNext j? s;Next IA、 1 2B、 2 1C、 2 2 12D、 1 2 12
考题
以下程序运行后的输出结果是【】。includemain(){int k=1,s=0; do{ if((k%2)!=0)continue;
以下程序运行后的输出结果是【 】。include<stdio.h>main(){ int k=1,s=0;do{if((k%2)!=0) continue;s+=k; k++;}while(k>10);printf("s+%d\n",s);}
考题
以下程序的输出结果是【】。 include include void main 0 { char s[50]; st
以下程序的输出结果是【 】。include<iostream.h>include <string.h>void main 0 {char s[50];strcpy(s[O], "No" );strcpy(s[1], "123" );strcpy (s[2], "23456" );cout<<s;}
考题
执行下列程序时输入:123456789,输出结果是______。 mein(){char s[100]; int c
执行下列程序时输入:123<空格>456<空格>789<回车>,输出结果是______。 mein() { char s[100]; int c, i; scanf("% c", C) ; scanf("% d", i); scanf("% s", s); printf("% c, % d, % s\n", c, i, s); }A.123, 456, 789B.1, 456, 789C.1, 23, 456, 789D.1, 23, 456
考题
以下程序的输出结果是()includemain(){chars1[]="123",s2[]="abc",ss[20]="010";strc
以下程序的输出结果是 ( ) #include<string.h> main() {char s1[]="123",s2[]="abc",ss[20]="010"; strcat(ss+1,strcpy(s2,s1)); printf("%s\n",ss); }A.10123B.0abcC.1123D.01abc
考题
以下程序的输出结果是()。includemain(){int a[3][3]={0,1,2,0,1,2,0,1,2},i,j,s=1;for
以下程序的输出结果是( )。 #include<stdio.h> main() {int a[3][3]={0,1,2,0,1,2,0,1,2},i,j,s=1; for(i=0;i<3;i++) for(j=i;j<=i;j++) s+=a[i][a[j][j]]; printf("%d\n",s); }A.3B.4C.1D.9
考题
若已包括头文件和,运行下列程序段时输出结果是()。int i=0;char s1[10]="ABCD
若已包括头文件<stdio.h>和<string.h>,运行下列程序段时输出结果是( )。 int i=0; char s1[10]="ABCD",s2[10]="EFG"; strcat(s1,S2); while(s2[i++]!='\0') s2[i]=s1[i]; puts(s2);A.ABCB.ABCDEFC.EBCDEFGD.CBD
考题
下列程序段的输出结果是( )。 ACCEPT TO A IF A=[123] S=0 ENDIF S=1 ?SA.0B.1SX
下列程序段的输出结果是( )。 ACCEPT TO A IF A=[123] S=0 ENDIF S=1 ?SA.0B.1C.123D.由A的值决定
考题
( 29 )有以下程序# include ( stdio.h )main (){ int a[5]= { 1 , 2 , 3 , 4 , 5 } , b[5] ={ O , 2 , 1 , 3 , 0 } , i , s = 0 ;for ( i = 0 ; i < 5 ; i++ ) s = s+a[b[i] ] ) ;printf ( " %d \ n ", s ) ;}程序运行后的输出结果是A ) 6B ) 10C ) 11D ) 15
考题
有以下程序 void swap(Char *x,Char *y) {Char t; t=*x;*x=*y;*y=t; } main( ) {Char *s1=”abc”,*s2=”123”; swap(sl,s2); printf(”%s,%s/n”,s1,s2); } 程序执行后的输出结果是()A、abe,123B、123,abcC、321,cbaD、1bc,a23
考题
单选题有以下程序:
#include
main()
{
if('\0'==0)putchar('1');
if('0'==0)putchar('2');
if('a''b')putchar('3');
}
程序运行后的输出结果是( )。A
1B
123C
23D
3
考题
单选题有以下程序 void swap(Char *x,Char *y) {Char t; t=*x;*x=*y;*y=t; } main( ) {Char *s1=”abc”,*s2=”123”; swap(sl,s2); printf(”%s,%s/n”,s1,s2); } 程序执行后的输出结果是()A
abe,123B
123,abcC
321,cbaD
1bc,a23
考题
单选题有以下程序
#include
voidswap(char*x,char*y)
{
chart;
t=*x;
*x=*y;
*y=t;
}
main()
{
char*s1,*s2;
chara[]=abc;
charb[]=123;
s1=a;
s2=b;
swap(s1,s2);
printf(%s,%s,s1,s2);
}
程序执行后的输出结果是( )。A
1bc,a23B
abc,123C
123,abcD
321,cba
热门标签
最新试卷