下列程序的输出结果是 #include"stdio.h" #define M(x,y) x%y main() { int a,m=12,n=100; a=M(n,m); printf("%d\n",a--);}
A.2
B.3
C.4
D.5
第1题:
程序编译后运行的输出结果是()。 #define N 5 #define M1 N*3 #include "stdio.h" #define M2 N*2 main() { int i; i=M1+M2; printf("%dn",i); }
第2题:
下列程序的输出结果为______。
include<iostream.h>
int&max(int&x,int&y)
{return(x>y? x:y);)
void main( )
{
int n=3,m=12;
max(m,n)++;
cout<<"m="<<m<<",n=<<n<<endl;
}
第3题:
阅读下列程序段,则程序的输出结果为 #include"stdio.h" #define M(X,Y)(X)*(Y) #define N(X,Y)(X)/(Y) main() { int a=5,b=6,c=8,k; k=N(M(a,b),c); printf("%d\n",k);}
A.3
B.5
C.6
D.8
第4题:
以下程序的输出结果是#include "stdio.h"int *fun(int *a,int *b){ int m; m=*a; m+=*b-3; return(&m);}main(){ int x=21,y=35,*a=&x,*b=&y; int *k; k=fun(a,b); printf("%d\n",*k);}
第5题:
有以下程序#include "stdio.h"#define M(x,y) (x)*(y) #define N(x,y) (x)/(y) main(){ int a=5,b=6,c=8,k; k=N(M(a,b),c); printf("%d\n",k);} 程序的运行结果是A.3 B.5C.6 D.8
第6题:
下列程序的输出结果是
#include "stdio.h"
#defineM(x,y)x%y
main()
{ int a,m=12,n=100;
a=M(n,m);
printf("%d\n",a--);}
A.2
B.3
C.4
D.5
第7题:
下列程序的输出结果是( )。
#include<stdio.h>
#define F(x)2.84+x
#define w(y)printf("%d",(int)(y))
#define P(y)w(y)putchar('\n')
main()
{ int x=2;
P(F(5) *x);
}
A.12
B.13
C.14
D.16
第8题:
阅读下列程序段,则程序的输出结果为 #include"stdio.h" #defineM(X,Y)(X)*(Y) #defineN(X,Y)(X)/(Y) main() {f int a=5,b=6,c=8,k; k=N(M(a,b),c); printf("%d\n",k);}
A.3
B.5
C.6
D.8
第9题:
下列程序的输出结果是
#include "stdio.h"
#define M(x,y) x%y
main()
{ int a,m=12,n=100;
a=M(n,m);
printf("%d\n",a--);}
A.2
B.3
C.4
D.5