问题
单项选择题
设有以下函数:Viod fun(int n,char *s) {…….}则下面对函数指针的定义和赋值均正确的是
A.viod (*pf)(); pf=fun;
B.viod *pf(); pf=fun;
C.viod *pf(); *pf=fun;
D.viod(*pf)(int,char);pf=&fun;
答案
参考答案:D
设有以下函数:Viod fun(int n,char *s) {…….}则下面对函数指针的定义和赋值均正确的是
A.viod (*pf)(); pf=fun;
B.viod *pf(); pf=fun;
C.viod *pf(); *pf=fun;
D.viod(*pf)(int,char);pf=&fun;
参考答案:D