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