网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
单选题
有以下程序:
#include
#define S(x)4*(x)*x+1
main()
{
int k=5,j=2;
printf(%d,S(k+j));
}
程序运行后的输出结果是( )。
A
197
B
143
C
33
D
28
参考答案
参考解析
解析:
根据宏定义的规定,题中S(k+j) = 4*(k+j)*k+j+1,分别代入k、j的值后求出的结果为143。答案选择B选项。
根据宏定义的规定,题中S(k+j) = 4*(k+j)*k+j+1,分别代入k、j的值后求出的结果为143。答案选择B选项。
更多 “单选题有以下程序: #include #defineS(x)4*(x)*x+1 main() { intk=5,j=2; printf(%d,S(k+j)); } 程序运行后的输出结果是( )。A 197B 143C 33D 28” 相关考题
考题
( 34 )有以下程序#include stdio.hint fun (){ static int x=1;x*2; return x;}main (){ int i,s=1 ,for ( i=1;i=2;i++ ) s=fun () ;printf ( " %d \ n " ,s ) ;}程序运行后的输出结果是A ) OB ) 1C ) 4D ) 8
考题
有以下程序#include stdio.hfun(int x){ if(x/20) f un(x/2);printf("%d ",x);}main(){ fun(6);printf("\n"); }程序运行后的输出结果是 【 1 5 】 。
考题
(36)有以下程序#include stdio.h#define PT 3.5;#define S(x) PT*x*x;main(){ int a=1, b=2; printf(“%4.1f\n”,S(a+b));}程序运行后输出的结果是A)14.0 B)31.5 C)7.5 D)程序有错无输出结果
考题
有以下程序:includestdio.hdefine S(x)4*(x)*x+1main( ){int k=5,j=2;printf(%d\n,S(k+j));}程序运行后的输出结果是( )。A.197B.143C.33D.28
考题
有以下程序includedefine PT3.5;define S(x)PT*x*x;main(){inta=1,b2;printf("%4.1f
有以下程序 #include<stdio.h> #define PT3.5; #define S(x)PT*x*x; main() { inta=1,b2; printf("%4.1f\n",S(a+b); } 程序运行后的输出结果是______。A.14.0B.31.5C.7.5D.程序有错无输出结果
考题
以下程序运行后的输出结果是( )。 include main() { int x=20; printf("%d", 0
以下程序运行后的输出结果是( )。include<stdio.h>main(){ int x=20;printf("%d", 0<x<20);printf("%d\n", 0<x x<20);}
考题
有以下程序: #include stdio.h main( ) { struct node{int n; struct node*next;} *P; struct node x[3]={{2,x+1),{4,x+2},{6,NULL}}; P= X; printf("%d,",p-n); printf("%d\n",p-next-n); } 程序运行后的输出结果是( )。A.2,3B.2,4C.3,4D.4, 6
考题
有以下程序:includedefine X 5+6main(){int a=2,c;C=X*2:printf("%d",C);}程序运行后
有以下程序: #include<stdio.h> #define X 5+6 main() {int a=2,c; C=X*2: printf("%d",C); } 程序运行后的输出结果是( )。A.17B.22C.16D.11
考题
以下程序运行后,输出结果是______。 define P4.5 define S(x)P*x*x include main() {
以下程序运行后,输出结果是______。 #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.5B.112.5C.18D.24
考题
有以下程序#include stdio.h#define S(x) (x)*x*2main( ){ int k=5, j=2;printf( "%d,”,s(k+j) ); printf(”%d\n”,s( (k-j) ) );}程序运行后的输出结果是A) 98,18B) 39,11C) 39,18D) 98,11
考题
以下程序运行后的输出结果是( )。 include main() {char ch[]="abcd",x[4][4];int i; f
以下程序运行后的输出结果是( )。 include<string.h> main() {char ch[]="abcd",x[4][4];int i; for(i=0;i<4;i++)strcpy(x[i],ch); for(i=0;i<4;i++)printf("%s",x[i][i]); printf("\n"); }
考题
有以下程序:includemain(){int x=3,y=2,z=1; printf("%d\n",x/y~z);程序运行后的
有以下程序: #include <stdio.h> main() { int x=3,y=2,z=1; printf("%d\n",x/y~z); 程序运行后的输出结果是( )。A.3B.2C.1D.0
考题
以下程序运行后,输出结果是() include define PT5.5 define S (x)PT* x * x
以下程序运行后,输出结果是 ( ) # include<stdio.h> # define PT5.5 # define S (x)PT* x * x main( ) { int a=1,b=2; printf("%4.1f\n",s(a+b)); }A.49.5B.9.5C.22D.45
考题
有以下程序: #includestdi0.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,18B.39,11C.39,18D.98,11
考题
有以下程序: #includestdio.h #define S(x)4*(x)*x+1 main( ) {int k=5,j=2; printf("%d\n",S(k+j)); } 程序运行后的输出结果是( )。A.197B.143C.33D.28
考题
有以下程序:include define F(X,Y)(X)*(Y)main(){int a=3,b=4;printf("%d\n",F(a++,b
有以下程序: #include <stdio.h> #define F(X,Y)(X)*(Y) main() { int a=3,b=4; printf("%d\n",F(a++,b++)); } 程序运行后的输出结果是( )。A.12B.15C.16D.20
考题
试题11以下程序运行后的输出结果是______.#include stdio.hvoid fun(int x){ if(x/50) fun(x/5)printf(“%d”, x);}main(){ fun(11); printf(“\n”);}
考题
(35)有以下程序#include stdio.h#define S(x) 4*(x)*x+1main(){ int k=5,j=2;printf("%d\n",S(k+j));}程序运行后的输出结果是A)197B)143C)33D)28
考题
单选题有以下程序:#include int fun(){ static int x=1; x*=2; return x;}main(){ int i,s=1; for(i=1;i=2;i++)s=fun(); printf(%d,s);}程序运行后的输出结果是( )。A
0B
1C
4D
8
考题
单选题若有以下程序
#include
#defineS(x)(x)*(x)
#defineT(x)S(x)/S(x)+1
main()
{
intk=3,j=2;
printf(%d,%d,S(k+j),T(k+j));
}
则程序的输出结果是( )。A
11,2B
25,2C
11,12D
25,26
考题
单选题有以下程序:#include main(){ char c='A'; int x=36,b; b=(x2)(c'a'); printf(%d,b);}程序运行后的输出结果是( )。A
1B
0C
2D
4
考题
单选题有以下函数:
#include
#defineS(x)(x)*x*2
main()
{
intk=5,j=2;
printf(%d,,S(k+j));
printf(%d,S(k-j));
}
程序运行后的输出结果是( )。A
98,18B
39,11C
39,18D
98,11
考题
单选题若有以下程序
#include
#defineS(x)x*x
#defineT(x)S(x)*S(x)
main()
{
intk=5,j=2;
printf(%d,%d,S(k+j),T(k+j));
}
则程序的输出结果是( )。A
17,37B
49,2401C
17,289D
49,289
考题
单选题有如下程序:
#include
#defineD(x)4*x+1
main()
{
inti=2,j=4;
printf(%d,D(i+j));
}
程序运行后的输出结果是( )。A
25B
13C
9D
12
考题
单选题有以下程序:#include #include main(){ int i,j,x = 0; for(i = 0;i 2;i++) { x++; for(j = 0;j = 3;j++) { if(j%2)continue; x++; } x++; } printf(x = %d,x);}程序的运行结果是( )。A
x=8B
x=4C
x=6D
x=12
考题
单选题有以下程序:#include main(){ struct node { int n; struct node *next; } *p; struct node x[3] = {{2,x+1},{4,x+2},{6,NULL}}; p=x; printf(%d,,p-n); printf(%d,p-next-n);}程序运行后的输出结果是( )。A
2,3B
2,4C
3,4D
4,6
热门标签
最新试卷