以下程序运行后,输出结果是______。 #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
第1题:
2、在C程序中如果要使用数学函数,如sin(x),log(x)等,需要在程序中加入的语句是
A.#include <math.h>
B.#include <stdio.h>
C.#define <math.h>
D.#define <stdio.h>
第2题:
16、在C程序中如果要使用数学函数,如sin(x),log(x)等,需要在程序中加入的语句是
A.#include <math.h>
B.#include <stdio.h>
C.#define <math.h>
D.#define <stdio.h>
第3题:
在C程序中如果要使用数学函数,如sqrt(x),pow(x,y)等,需要在程序中加入的语句是______
A.#define <math.h>
B.#define <stdio.h>
C.#include <stdio.h>
D.#include <math.h>
第4题:
在C程序中如果要使用数学函数,如sin(x),log(x)等,需要在程序中加入的语句是
A.#include <math.h>
B.#include <stdio.h>
C.#define <math.h>
D.#define <stdio.h>
第5题:
以下程序运行后,输出结果是 #define PT 5.5 #define S(x) PT*x*x #include<stdio.h> main() { int a=1,b=2; printf("%4.1f\n",S(a+b));}
A.49.5
B.9.5
C.22
D.45
第6题:
以下程序运行后,输出结果是 ( ) # 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.5
B.9.5
C.22
D.45
第7题:
有以下程序 #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.0
B.31.5
C.7.5
D.程序有错无输出结果
第8题:
有以下程序: #include <stdio.h> main() { int a[] = {2,4,6,8,10} ,y =0,x, * p; p =&a[1]; for(x=1;x<3;x++)y+ =p[x]; printf( "% d \n" , y); }程序运行后的输出结果是( )。
A.10
B.11
C.14
D.15
第9题:
以下程序运行后,输出结果是 #define PT 5.5 #define S(x) PT*x*x #include<stdio.h> main() { int a=1,b=2; printf("%4.1f\n",s(a+b));}
A.49.5
B.9.5
C.22
D.45.0