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

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

有以下程序

# 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# 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 ” 相关考题
考题 #define能作简单的替代,用宏来替代计算多项式5*x*x+5*+5的值的函数f,正确的宏定义语句为( )。A.#definef(x)5*x*x+5*+5B.#definef5*x*x+5*x+5C.#definef(a) (5*a*a+5*a+5)D.#define5*x*x+5*+5f(x)

考题 #define能作简单的替代,用宏来替代计算多项式5*x*x+5*x+5的值的函数f,正确的宏定义语句为( )。A.#definef(x)5*x*x+5*x+5B.#definef5*x*x+5*x+5C.#definef(a)(5*a*a+5*a+5)D.#define(5*x*x+5*x+5)f(x)

考题 #define能作简单的替代,用宏来替代计算多项式5 *x*x+5*x+5的值的函数f,正确的宏定义语句为( )。A.#define f(x) 5*x*x+5*x+5B.#define f5*X*x+5*x+5C.#define f(a) (5*a*a+5*a+5)D.#define(5*x*x+5*x+5) f(x)

考题 在C程序中如果要使用数学函数,如sin(x),log(x)等,需要在程序中加入的语句是A.#include <math.h>B.#include <stdio.h>C.#define <math.h>D.#define <stdio.h>

考题 在C程序中如果要使用数学函数,如sqrt(x),pow(x,y)等,需要在程序中加入的语句是______A.#define <math.h>B.#define <stdio.h>C.#include <stdio.h>D.#include <math.h>

考题 16、在C程序中如果要使用数学函数,如sin(x),log(x)等,需要在程序中加入的语句是A.#include <math.h>B.#include <stdio.h>C.#define <math.h>D.#define <stdio.h>

考题 2、在C程序中如果要使用数学函数,如sin(x),log(x)等,需要在程序中加入的语句是A.#include <math.h>B.#include <stdio.h>C.#define <math.h>D.#define <stdio.h>

考题 在C程序中如果要使用数学函数,如sin(x),log(x)等,需要在程序中加入的语句是()A.#include <stdio.h>B.#define <stdio.h>C.#include <math.h>D.#define <math.h>

考题 在C程序中如果要使用数学函数,如sin(x),log(x)等,需要在程序中加入的语句是________。A.#include <math.h>B.#include <stdio.h>C.#define <math.h>D.#define <stdio.h>

考题 define能作简单的替代,用宏替代计算多项式4*x*x+3*x+2之值的函数f,正确的宏定义是()。A.#define f (x) 4*x*x+3*x+2B.#define f 4*x*x+3*x+2C.#define f(a) (4*a*a+3*a+2)D.#define (4*a*a+3*a+2) f(a)