下面程序的运行结果是()。 #define DOUBLE(r)   r*r  main( )  {   int a=1,b=2,temp;      temp=DOUBLE(a+b);      printf(“%d/n”,temp);  } A、3B、5C、7D、9

下面程序的运行结果是()。 #define DOUBLE(r)   r*r  main( )  {   int a=1,b=2,temp;      temp=DOUBLE(a+b);      printf(“%d/n”,temp);  } 

  • A、3
  • B、5
  • C、7
  • D、9

相关考题:

下面程序由两个源文件 t4.h 和 t4.c 组成,程序编译运行的结果是 【 18 】 。t4.h 的源程序为:#define N 10#define f2(x) (x*N)t4.c 的源程序为:#include stdio.h#define M 8#define f(x) ((x)*M)#include "t4.h"main(){ int i,j;i=f(1+1); j=f2(1+1);printf("%d %d\n",i,j);}

下面程序的输出结果是【】。define MIN(a,b) (((a)void main(){int 下面程序的输出结果是【 】。define MIN(a,b) (((a)<(b))?a:b)include <iostream.h>void main(){int x= 3, y=5;cout<< MIN(x,y)<<end1;}

(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)程序有错无输出结果

以下程序运行后,输出结果是define PT5.5define S(x)PT*x*xincludemain(){int a=1,b= 以下程序运行后,输出结果是 #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.5B.9.5C.22D.45.0

下面程序的运行结果是【17】。#define N 10#define s(x)x*x#define f(x)(x*x)main(){ int i1,i2;i1=1000/s(N); i2=1000/f(N);printf("%d %d\n",i1,i2);}

以下程序的运行结果是( )。 define A 4 define B(x)A*x/2 main() {float c,a=8.0; c=B(A; printf("%f\n",C); }

程序中头文件type1.h的内容是( )。 #define N 5 #define M1 N*3 程序如下: #define "type1.h" #define M2 N*2 main() { int i; i=M1+M2; printf("%d\n",i); } 程序编译后运行的输出结果是( )。A.10B.20C.25D.30

下面程序的运行结果是( )。 define POW(r)r*r main() {int x=2,y=3,t; t=POW(x+y); printf("%d\n",t); }

下面程序的运行结果是 #include"iostream.h" #define sum(a,b) a*b void main( ) { int x; x=sum(1+2,3); cout<<x; }A.0B.9C.7D.5

程序中头文件type1.h 的内容是#define N 5#define M1 N*3程序如下:#define "type1.h"#define M2 N*2main (){ int i; i=M1+M2; printf("%d\n", i);) 程序编译后运行的输出结果是( )。A.10B.20C.25D.30

下面程序和运行运行结果是【 】。define N 10define s (x) x * xdefine f(x) (x * x)main( ){ iht i1,i2;i1 = 1000/s(N); i2 = 1000/f(N);printf("%d %d\n",i1,i2);}

下列程序的运行结果是______。define POWER(x) ((x)*(x))main (){ int i=1;printf("%d,%d",POWER(i++),i);}

以下程序的运行结果是( )。 define S(x)x*x main() {int k=1; while(k<=4) {printf("%d,",S(k)); k++;}

下面的程序输出结果是 ______。 #define r 16 #if r==16 void p(int a) { printf("%x",a) ; } #else void p(int a) { printf("%d",a) ; } #endif main() { p(32); }A.32B.20C.编译时错误D.运行时错误

有以下程序#include stdio.h#define P 24;#define S(x) P*x+x;main(){ int a=2, b=2; printf("%d\n",S(a+b));}程序的运行结果是A.程序编译运行时报错,无法输出 B.54 C.96 D.100

下面程序的运行结果是( )。define EXCH(a,B){int t;t=a;a=b;b=t;}main(){int x=1,y=2;EXCH(x,y);printf("x=%d,y=%d\n",x,y);}

程序中头文件typel.h的内容是: #define N 5 #define M1 N *3 程序如下: #include“typel.h” #define M2 N*2 main() { int i; i=M1+M2;Printf(“%d\n”,0; } 程序编译后运行的输出结果是:A.10B.20C.25D.30

下面程序的输出结果是( )。 #define PI 3.1415 #define ARE(X) PI*x*x main() { int r=2; printf("%.2f",ARE(r+1)); }A.28.26B.28.26C.9.28D.9.28

下面的程序输出结果是( )。 #define U 5 #define V U+1 #define W V*V/2 main() {printf("%d ",W); printf("%d",5*W); }A.18 72B.10.5 52.5C.10.5 25.5D.10 30

下面程序的输出结果是( ) #define PI 3.1415 #define ARE(x) PI*x*x main () {int r=2; printf("%f",ARE(r+1)); }A.28.26B.28.26C.9.28D.9.28

若有如下程序; #define X 3 #define Y X+1 #define Z Y*Y/2 main() { int n; for(n=1;n<=Z;n++) printf("%d",n); } 则程序运行后的输出结果是( )A.12345B.1234567C.12345678D.123456

程序中头文件typel.h的内容是 #define N 5 #define M1 N*3 #define "typel .h" #define M2 N*2 main ( ) { int i; i=M1+M2; printf ("%d\n", i ); } 程序编译后运行的输出结果是A.10B.20C.25D.30

有以下程序: include define M 5 define f(x,y) x*y+M main( ) { int k; k=f(2,3)*f(2,3); printf("%d\n",k); } 程序的运行结果是( )。 A.22B.41C.100D.121

下面程序的运行结果是_____和_____。 include define N 10 define s(x) x * x define 下面程序的运行结果是_____和_____。include<iostream.h>define N 10define s(x) x * xdefine f(x) (x * x)void main( ){ int i1,i2;i1=1000/s(N) ;i2=1000/f(N) ;cout < < i1 < < " " < < i2;}

单选题有以下程序:#include #define F(x) 2.84+x#define PR(a) printf(%d,(int)(a))#define PRINT(a) PR(a);putchar('')main(){ PRINT(F(5)*2);}程序运行后的输出结果是(  )。A12B13C15D11

单选题有以下程序;#include #define N 2#define M N+1#define MUN (M+1)*M/2main(){ printf(%d,MUN);}程序运行后的输出结果是(  )。A8B9C5D6

单选题下面程序的运行结果是()。 #define DOUBLE(r)   r*r  main( )  {   int a=1,b=2,temp;      temp=DOUBLE(a+b);      printf(“%d/n”,temp);  }A3B5C7D9