若有以下函数首部 int fun(double x[10], int *n) 则下面针对此函数的函数声明语句中正确的是

admin2020-07-28  32

问题 若有以下函数首部
    int  fun(double x[10], int *n)
则下面针对此函数的函数声明语句中正确的是

选项 A、int  fun(double  , int );
B、int  fun(double *,  int *);
C、int  fun(double *x, int n);
D、int  fun(double x, int *n);

答案B

解析 函数声明的一般形式为:类型说明符 被调函数名(类型 形参,类型 形参…); 或为:类型说明符 被调函数名(类型,类型…);由于函数首部为int  fun(double x[10], int *n),因此B选项正确。
转载请注明原文地址:https://kaotiyun.com/show/jW3p777K
0

最新回复(0)