网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

1、设有以下宏定义: #define N 3 #define Y(n) ((N+1)*n) 则执行语句z=2*(N+Y(5+1));后,z的值为()。

A.60

B.42

C.48

D.54


参考答案和解析
D
更多 “1、设有以下宏定义: #define N 3 #define Y(n) ((N+1)*n) 则执行语句z=2*(N+Y(5+1));后,z的值为()。A.60B.42C.48D.54” 相关考题
考题 若有以下宏定义:#define N 2#define Y(n)((N+1)*n)则执行语句z=2*(N+Y(5));后的结果是( )。A.语句有错误B.z=34C.z=70D.z无定值

考题 有以下程序 include define N 5 define M N+1 有以下程序 #include <stdio.h> #define N 5 #define M N+1 #define f(x) (x*M) main() { int i1,i2; i1=f(2) i2=f(1+1); printf("%d %d\n",i1,i2); } 程序的运行结果是______。A.12 12B.11 7C.11 11D.12 7

考题 执行下列程序段之后,变量n的值为( )。 public class Test { public static void main(String[ ] args){ int y = 2; int z = 3; int n = 4; n=n+-y* z/n; System.out.println(n); } }A.3B.-1C.-12D.-3

考题 设有如下宏定义#define MYSWAP(z,x,y){z=x;x=y;y=z;}以下程序段通过宏调用实现变量a,b内容交换,请填空。float a=5,b=16,c;MYSWAP(( ),a,b);

考题 设有如下宏定义define MYSWAP(z,x,y){z=x;x=Y;Y=z;}以下程序段通过宏调用实现变量a、b内容的交换,请填空。float a=5,b=16,c;MYSWAP( 【 】,a,b) ;

考题 下列程序中的for循环执行的次数是______。 #define N 2 #define M N+1 #define NUM 2*M+1 #main ( ) { int i; for (i=1;i<=NUM;i++) printf ("%d\n", i); }A.5B.6C.7D.8

考题 设有以下宏定义:#define N 3#define Y(n) ((N+1)*n)则执行以下语句后,z的值为______。z=2 * (N+Y(5+1));A.出错B.42C.48D.54

考题 设有如下定义 int x=10,y=3,z; 则语句 printf("%d\n",z=(x%y,x/y)); 的输出结果是( )A.3B.0C.4D.1

考题 下面程序的输出是()。define N 3define M(n) ((N+1)*n)include void main(){int 下面程序的输出是( )。#define N 3#define M(n) ((N+1)*n)#include <iostrearn.h>void main(){ int z=2*(N+M(5+1)); cout<<z<<end1;}A.42B.48C.54D.编译报错

考题 执行下列程序段这后,变量n的值为______。 public class Test8 { public static void main(String[] args} { int y=2; int z=3; int n=4; n=n+-y*z/n; System.out.println (n); } }A.3B.-1C.-3D.-12

考题 设有以下宏定义: #define N 3 #define Y(n) ((N+1)*n)则执行以下语句后,z的值为______。 z=2*(N+Y(3+2));A.出错B.34C.46D.54

考题 设有以下宏定义: # define N 3 # defi0ne Y(n)(N+1) * n) 则执行语句“z=2*(N+Y(5+1));”后,z的值为 ( )A.出错B.42C.48D.54

考题 设有如下定义: int x=10,y=3,z; 则语句printf("%d\n",z=(x%y,x/y)); 的输出结果是( )。A.1SX 设有如下定义: int x=10,y=3,z; 则语句printf("%d\n",z=(x%y,x/y)); 的输出结果是( )。A.1B.0C.4D.3

考题 若有如下程序; #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

考题 以下程序中的for循环执行的次数是______。 #define N 2 #define M N+1 #define NUM 2*M+1 main() { int i; for(i=1;i<NUM;i++) printf("%d\n",i); }A.5B.6C.7D.8

考题 若m,y,z均为int型变量,则执行下面语句后m值是______。 m=1;x=2;y=3;z=4; m=(m<x)?m:x; m=(n<y)?m:y; m=(m<z)?m;z;A.1B.2C.3D.4

考题 若有宏定义如下: #define X 5 #define Y X+1 #define Z Y*X/2以下程序段的输出结果是______。 int a;a=Y; printf("%d\n",Z); printf("%d\n",--a);A.7 6B.12 6C.12 5D.7 5

考题 以下for循环共执行循环体( )次。define N 2 define M N+1 define NUM 2*M+1 int i; for(i=1;i A、5B、6C、7D、8

考题 执行下列程序之后,变量n的值为 publicclassExam{ publicstaticvoidmain(String[]args){ int y=2; int z=3; int n=4; n=n+-y*z/n; System.out.println(n); } }A.3B.-1C.-12D.-3

考题 设有如下定义:intx=10,y=3,z;则语句 printf("%d/n",z=(x%y,x/y));的输出结果是()A、1B、0C、4D、3

考题 若有以下宏定义:  #define  N  2  #define  Y(n)  ((N+1)*n)  则执行赋值语句z=2*(N+Y(5));后,变量z的值是多少?

考题 以下for语句构成的循环执行的次数是()     #include      #define N 2  #define M N+l  #define NUM(M+1)*M/2      main( )  {int i,n=0;  for(i=1;i=NUM;i++)        {n++;printf(“%d”,n);}        printf(“/n”);} A、5B、6C、8D、9

考题 设有以下宏定义,#defineN3#defineY(n)((N+1)*n)则执行语句“z=2*(N+Y(5+1));”后,z的值为()。A、出错B、42C、48D、54

考题 有以下宏定义#defineN2#defineY(n)((N+1)*n)则表达式z=2*(N+Y(5));的值为()A、34B、70C、无定值D、表达式有误

考题 单选题有以下宏定义#defineN2#defineY(n)((N+1)*n)则表达式z=2*(N+Y(5));的值为()A 34B 70C 无定值D 表达式有误

考题 单选题以下for语句构成的循环执行的次数是()     #include      #define N 2  #define M N+l  #define NUM(M+1)*M/2      main( )  {int i,n=0;  for(i=1;iA 5B 6C 8D 9

考题 单选题设有如下定义:intx=10,y=3,z;则语句 printf("%d/n",z=(x%y,x/y));的输出结果是()A 1B 0C 4D 3

考题 问答题若有以下宏定义:  #define  N  2  #define  Y(n)  ((N+1)*n)  则执行赋值语句z=2*(N+Y(5));后,变量z的值是多少?