A.5
B.6
C.7
D.8
[单选题]有如下程序: # 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
[单选题]以下程序段中Do...Loop循环执行的次数为( )。 n=5 Do lf n Mod 2=0 Then n=n/2 Else n=n*3+1 End If Loop untiln=1A.4B.3C.5D.2
[单选题]执行下列程序的结果是( )。 #define N 5 #define H(x) ((N+2)*x) main() { int a=2,b=3,C; c=H(a+b); printf("%d",c); }A.15B.17C.23D.35
[单选题]以下程序段中Do...Loop循环执行的次数为______。 n=5 Do if n mod 2=0 then n=n/2 else n=n*3+1 end if Loop until n=1A.4B.3C.5D.2
[单选题]有以下程序 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
[主观题]下列中 a的值是_________#define AAA 200#define BBB AAA+100int a= BBB*2
[单选题]若有以下宏定义: # define N 2 # define Y(n) ((N+1)*n) 则执行语句z=2*(N+Y(5));后的结果是A.语句有错误B.z=34C.z=70D.z无定值
[单选题]有如下程序#define N 2#define M N+1#define NUM 2*M+1main(){ int i; for(i = 1; i <= NUM; i++) printf("%d/n",i);}该程序中for循环执行的次数是A.5 B.6 C.7 D.8
[单选题]有以下程序: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
[单选题]若有以下宏定义:#define N 2#define Y(n)((N+1)*n)则执行语句z=2*(N+Y(5));后的结果是( )。A.语句有错误B.z=34C.z=70D.z无定值