单选题
C语言
题号 #2268711
设有以下函数:
void fun(int n,char*s){…}
则下面对函数指针的定义和赋值均正确的是( )。
参考答案
A
答案解析
函数指针的定义格式为函数类型(*指针变量名)(形参列表);函数名和数组名一样代表了函数代码的首地址,因此在赋值时,直接将函数指针指向函数名就行了。所以选项A正确。
你可能感兴趣的试题
A.7
B.8
C.9
D.10
A.10,64
B.10,10
C.64,10
D.64,64
A.struct ord{int x;int Y;int Z;};struet ord a;
B.struct ord{int x;int y;int Z;}struct ord a;
C.struct ord{int X;int Y;int Z;}a;
D.struct{int X;int y;int Z;}a;