单项选择题

有以下程序
#include<stdio.h>
#define N 2
#define M N+1
#define NUM(M+1)*M/2
main()
printf("%d\n",NUM);
程序运行后的输出结果是______。

A.8
B.4
C.9
D.6
<上一题 目录 下一题>
热门 试题

单项选择题
以下叙述中正确的是______。
A.在C语言中,预处理命令行都以”#”开头
B.预处理命令行必须位于C源程序的起始位置
C.#include<stdio.h>必须放在C程序的开头
D.C语言的预处理不能实现宏定义和条件编译的功能
单项选择题
设有以下函数: void fun(int n,char*s) …… 则下面对函数指针的定义和赋值均正确的是______。
A.void(*pf)(int,char*);pf=fun;
B.void*pf();pf=fun;
C.void*pf();*pf=fun;
D.void(*pf)(int,chad;)pf=&fun;
相关试题
  • 有以下程序 #include<stdio.h> main...
  • 有以下程序 #include<stdio.h> main...
  • 有以下程序 #include<stdio.h> main...
  • 有以下程序 #include<stdio.h> main...
  • 以下程序依次把从终端输入的字符存放到f文...