下列程序的运行结果是()。 include<stdio.h>define ADD(x) x+xmain(){int m=1,n=2,k=3; int s=A
下列程序的运行结果是()。 include<stdio.h> define ADD(x) x+x main() { int m=1,n=2,k=3; int s=ADD(m+n)*k; printf("s=%d",s); }
A.sum=18
B.sum=10
C.sum=9
D.sum=25
时间:2023-10-07 13:12:59
相似题目
-
下列程序的运行结果是() #include main() { int a=2,c=5; printf("a=%d,b=%d\n",a,c); }
A . a=%2,b=%5
B . a=2,b=5
C . a=d,b=d
D . a=%d,b=5d
-
阅读下列程序,则在执行后,程序的运行结果为( ).#include stdio.h#include string.hmain( ){ char a[30]=nice to meet you!
-
有下列程序: #include void main( ) { int a[]={1,2,3,4},y,*p=&a[3]; --p; y=*p; printf(\y=%d\\n\,y); } 程序运行结果是( )。
-
有下列程序,程序运行后的输出结果是0( )。#include int main( ){int a[5]={1,2,3};printf(\%d \,a[3]);return 0;}
-
如果在下面程序运行时输入123456,程序的运行结果是【 】。 include<stdio.h>int main(); }
A.12,56
B.12,34
C.34,56
D.123456
-
有以下程序: include<stdi0.h> define S(x)(x)"x"2 main() { int k一5,j=2; Dri
有以下程序: include<stdi0.h> define S(x)(x)"x"2 main() { int k一5,j=2; Drintf("%printf,",S(k+j));printf("%printf\n",S((k—j))); } 程序运行后的输出结果是()。
A.98,18
B.39,11
C.39,18
D.98,11
-
下面程序的运行结果是()。 include<iostream.h
A.12 12
B.12 21
C.21 12
D.21 21
-
要求下面的程序运行后,显示如下结果: 2 10 4 6 1 5 2 3 2 4 7 8 5 1 3 2 下列程序执行后的输出结果是________。 include void main(); }
A.2,0
B.1,4
C.2,1
D.0,3
-
include<stdio.h>main(); } 程序运行后的输出结果是
A.0,0
B.0,-1
C.-1,-1
D.结果不确定
-
有下列程序: include<stdi0.h> voidmain() {FILE*f; f=fopen("filea.txt","w"); fp
有下列程序: include<stdi0.h> voidmain() {FILE*f; f=fopen("filea.txt","w"); fprintf(f,"abe"); fclose(f); } 若文本文件filea.txt中原有内容hell0,则运行以上程序后,文件Iilea.txt中的内容为()。
A.helloabe
B.abclo
C.abe
D.abchello
-
有下列程序: include<stdi0.h> voidmain() {char*a[]={"abcd","ef","gh","ijk");inti; for(i=0;i<4;i++)printf("%C",*a[i]); } 程序运行后的输出结果是()。
A.aegi
B.dfhk
C.abcd
D.abcdefghijk
-
下列程序的运行结果是()。include<stdio.h>define ADD(x) x+x main{ int m=1,n=2,k=3;in
下列程序的运行结果是()。
include<stdio.h>
define ADD(x) x+x
main
{ int m=1,n=2,k=3;
int S=ADD(m+n)*k;
printf("s=%d",s);
}
A.A.sum=18
B.sum=10
C.sum=9
D.sum=25
-
下列程序的运行结果是()。include<stdio.h>main(){int a=2,b=3,c=4; if(a<B)if(b<0) c=0; else c
下列程序的运行结果是()。 include<stdio.h> main() { int a=2,b=3,c=4; if(a<B) if(b<0) c=0; else c+=1; printf("%d\n",C) ; }
A.2
B.3
C.5
D.4
-
下列程序的运行结果为()。 include<iostream.h> void main { int a=2: int b=a+1: co
下列程序的运行结果为()。 include<iostream.h> void main { int a=2: int b=a+1: cout<<a/b<<endl:
A.0.66667
B.0
C.0.7
D.0.66666666…
-
下列程序输出的结果是()。 include<stdi0.h> funl(chara,charb){charC;c=a;a=b;b=C;) f
下列程序输出的结果是()。 include<stdi0.h> funl(chara,charb){charC;c=a;a=b;b=C;) fun2(char*a,charb){charC;c=*a;*a=b;b=c;) fun3(char*a,char*b){charC;C=*a;*a=*b;*b=C;) voidmain() { chara,b; a=A;b=B;fun1(a,b);putchar(a);putchar(b); a=A;b=B;fun2(&a,b);putchar(a);putchar(b); a=A;b=B;fun3(&a,&b);putchar(a);putchar(b); putchar(\n); }
A.BABBAB
B.ABBBBA
C.ABBABA
D.ABABBA
-
有下列程序,程序运行后的输出结果是( )。
#include <stdio.h>
int main()
{
int i,sum;
for (i=1;i<6;i++) sum+=sum;
printf("%d",sum);
return 0;
}
-
下列程序的运行结果是()。 include main { int a=2,b=3,c=4: if(a
A.2
B.3
C.5
D.4
-
有以下程序 include<stdio.h>include<string.h>void fun(); } 程序运行后的输出结果是
A.012345
B.876543210
C.876543
D.012345678
-
下列程序的运行结果是()。 include class A { int a; public: A{a=0;} A(int aA. { a=aa; cout$amp;A.00
B.23
C.34
D.25
-
include<stdi.h>main() {intx,y; fr(y=1,x=1;y<=20:y++) {if(x>=8)break; if(x%2==1){x+=5;cntinue;} x-=3; } printf("x=%d,y=%d\n",x,y); } [运行结果]
include<stdi.h>
main()
{intx,y;
fr(y=1,x=1;y<=20:y++)
{if(x>=8)break;
if(x%2==1){x+=5;cntinue;}
x-=3;
}
printf("x=%d,y=%d\n",x,y);
}
[运行结果]
-
下列程序的运行结果是 。 include ...
下列程序的运行结果是 。 include <iostream> using namespace std; float f (float sum, float x[ ], int n) { for(int i=0; i <n 8 ; i++) sum+="x[i];" return sum="0," n; } void main() { float x[]="{" 2, 4, 6, }, y; y="f(sum," x, 4); “sum="”&lt;&lt;sum&lt;&lt;endl;" “y="”&lt;&lt;y&lt;&lt;endl;">
-
有以下程序include ’stdio.h’min()} 程序的运行结果是3 B.5C.7 D.8
A.3
B.5
C.7
D.8
-
有以下程序 include<stdio.h> include<stdio.h> intfun()); } 程序的运行结果是10 B.20 C.0 D.出错
A.10
B.20
C.0
D.出错
-
有以下程序: include<stdi0.h> ()
A.1098.0
B.1002,ChangRong,1202.0
C.1001,ChangRong,1098.0
D.1002,ZhangDa,1202.0