单项选择题

有以下程序:
#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 12
B. 11 7
C. 11 11
D. 12 7

<上一题 目录 下一题>
热门 试题

单项选择题
有以下程序: #include <stdio.h> main() char c1,c2,c3,c4,c5,c6; scanf( %C%C%C%c ,&c1,&c2,&c3,&c4); c5=getchar();c6=getchar(); putchar(c1);putchar(c2); printf( %c%c n ,c5,c6); 程序运行后,若从键盘输入(从第1列开始): 123 <回车> 45678 <回车> 则输出结果是()

A. 1267
B. 1256
C. 1278
D. 1245

单项选择题
有以下程序: #include <stdio.h> #include <string.h> typedef struct char name[9];char sex; float score[2];STU; void f(STU a) STU b= Zhao ,'m',85.0,90.0;int i; strcpy(a.name,b.name); a.sex=b.sex; for(i=0;1<2;i++) a.score[i]=b.score[i]; main() STU c= Qian ,'f',95.0,92.0; f(c); printf( %s,%c,%2.0f,%2.0f n ,c.name,c.sex,c.score[0],c.score[1]); 程序的运行结果是()

A. Qian,f,95,92
B. Qian,m,85,90
C. Zhao,f,95,92
D. Zhao,m,85,90

相关试题
  • 有以下程序: #include <stdio.h> m...
  • 有以下程序: #include <stdio.h> ...