首页 > 试题广场 >

设有以下函数 void fun(int n,char *s)

[单选题]
设有以下函数 void fun(int n,char *s) {......}。则下面对函数指针的定义和赋值均是正确的是:
  • void (*pf) (int, char);              pf = &fun;
  • void (*pf)(int n,char *s);    pf = fun;
  • void *pf();                    *pf = fun;
  • void *pf();                    pf = fun;
函数指针要给出【返回值】和【形参表】,题目中的函数返回值是void 参数是int和char*,选B
发表于 2019-12-27 08:36:14 回复(0)
c的指针是真没学
发表于 2019-12-22 23:18:02 回复(0)