下面程序的输出结果是#include<stdio.h>main(){int i=010,j=10;Printf(“%d,%d”,++i,j--);}A.11,1
下面程序的输出结果是 #include<stdio.h> main() {int i=010,j=10; Printf(“%d,%d”,++i,j--); }
A.11,10
B.9,10
C.010,9
D.10,9
下面程序的输出结果是 #include<stdio.h> main() {int i=010,j=10; Printf(“%d,%d”,++i,j--); }
A.11,10
B.9,10
C.010,9
D.10,9
下面程序运行后的输出结果是()。 #include<stdio.h> main() {int a[5]={1,0,4,2,0},b[5]={1,2,3,4,5},i,s=0; for(i=0;i<5;i++)s=s+b[a[i]]; printf("%d\n”,s); }
A.12
B.15
C.11
D.8
下面程序的输出结果是______。 #include<stdio.h> main() { char ch[7]={"12ab56"}; int i,s=0; for(i=0;ch[i]>='0'&&ch[i]<='9';i+=2) s=10*s+ch[i]-'0'; printf("%d\n",s); }
A.1
B.1256
C.12ab56
D.1 2 5 6
下面程序的输出结果是()。 #include <iostream> using namespace std; void main() { inta[3][3] ={{1,2},{3,4},{5}}; int s =0; for(int i=1;i<3;i++) for(int j=0;j<=i;j++) s+=a[i][j]; cout<<s<<endl;
A.12
B.4
C.15
D.13
执行下面程序后输出的结果是()。 #include <iostream> using namespace std; int main(){ int a[4][4]={{1,2,3,-4},{7,-12,-13,8},{-21,9,0,-24},{-31,10,-33,11}}; int i,j,s=0; for(i=0;i<4;i++){ for(j=0;j<4;j++){ if(a[i][j]>=0)continue; s+=a[i][j]; } } coat<<s<<endl; return 0; }
A.141
B.-138
C.-1
D.75
下面程序运行输出的结果是【 】。
include <iostream>
using namespace std;
int main(){
char a[]="Chinese";
a[3]='\0';
cout<<a<<endl;
return 0;
}
以下程序的输出结果是()。
#include<iostream.h>
longfun(intn)
{longs;
if(n=-1‖n==2)s=2;
elses=n-fun(n-l):
returns;
}
voidmain(){cout<<fun(3);}
A.1
B.2
C.3
D.4
设已执行预编译命令#include<string.h>,以下程序段的输出结果是()。 char s[]=" an apple" ; printf(" %d\n" ,strlen(s));
A.7
B.8
C.9
D.10
A.14.0
B.31.5
C.7.5
D.程序有错无输出结果
下列程序执行的输出结果是()。 #include<stdio.h> main() { char a[2][4]; strcpy(a,"are");strcpy(a[1],"you"); a[0][3]='&'; printf("%s\n",a); }
A.are&you
B.you
C.are
D.&
以下程序运行后,输出结果是______。 #define P4.5 #define S(x)P*x*x #include<stdio.h> main() { int a=2,b=3; printf("%.1f\n",S(a+b)); }
A.49.5
B.112.5
C.18
D.24