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

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

【填空题】若有以下定义: #define N 2 #define Y(n) ((N+1)*n) 则执行语句Z = 3 * (N+Y(2*2));的结果为       。


参考答案和解析
B z=2*(N+Y(5))展开后为:2*(2+((2+1)*5))得到结果为34。
更多 “【填空题】若有以下定义: #define N 2 #define Y(n) ((N+1)*n) 则执行语句Z = 3 * (N+Y(2*2));的结果为       。” 相关考题
考题 若要求定义具有 10 个 int 型元素的一维数组 a ,则以下定义语句中错误的是A ) #define N 10int a[N];B ) #define n 5int a[2*n];C ) int a[5+5];D ) int n=10,a[n];

考题 若有以下宏定义:#define N 2#define Y(n)((N+1)*n)则执行语句z=2*(N+Y(5));后的结果是( )。A.语句有错误B.z=34C.z=70D.z无定值

考题 若要求定义具有1O个int型元素的一维数组a,则以下定义语句中的错误的是______。A.#define N 10 int a[N];B.#define n 5 int a[2*n]C.int a[5+5];D.int n=10,a[n];

考题 有以下程序 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

考题 下列程序中的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

考题 有如下程序: # 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); } 该程序中的for循环执行的次数是______。A.5B.6C.7D.8

考题 有如下程序includedefine N2define M N+1define NUM 2*M+1void main( ){int i;f 有如下程序 #include<iostream.h> #define N2 #define M N+1 #define NUM 2*M+1 void main( ) { int i; for(i=1,i<= NUM;i++) cout<<i;} 该程序中的for循环执行的次数是A.5B.6C.7D.8

考题 下面程序的输出是()。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.编译报错

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

考题 有以下程序:includedefine N 5define M N+1define f(x)(x*M)main(){int i1,i2;i1=f 有以下程序: #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",i1,i2); } 程序的运行结果是( )。A.12 12B.11 7C.11 11D.12 7

考题 若要求定义具有10个int型元素的一维数组a,则以下定义语句中错误的是A.#define N 10 int a [N];B.#define n 5 int a [2*n];C.int a [5+5];D.int n=10,a [n];

考题 有如下程序段,设n为3的倍数。则语句③的执行频度为______。 Lnt i,j ; ① for(i=i;i<n; i++){ ② if(3*i<=n){ ③ for(j=3*i;j<n;j++){④ x++;y=3*x+2; } } }A.n(n+1)/6B.n(n-1)/6C.n2/6D.(n+1)(n-1)/6

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

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

考题 以下程序中的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 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

考题 以下程序的输出结果是( )。define M(x,y,z)x*y+zmain( ){ int a=l,b=2,c=3;printf(%d\n%d\n,m(a+b.b+c,c+a));}A.19B.1 7C.15D.12

考题 若有以下宏定义:  #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

考题 已知以下程序段的运行结果为“654321”,则下划线所在位置应填入的代码是() #define N 6 int a[N]={1,2,3,4,5,6},i,t; for(i=0;i________;i++){t=a[i];a[i]=a[N-i-1];a[N-i-1]=t;} for(i=0;iA、N/2B、NC、N/2+1D、N+1

考题 设有以下宏定义,#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

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