题库 软件开发 题目列表 有以下程序 #include <iostream> using namespa...
单选题
有以下程序
#include <iostream>
using namespace std;
void (*function)(float);

void One(float one) {
    cout<<"1"<<endl;
}

void Two(float two) {
    cout<<"2"<<endl;
}

void Three(float three) {
    cout<<"3"<<endl;
}

int main() {
    float i=1,j=2,k=3;
    function = One;
    function(i);
    function= Two;
    function(j);
    function = Three;
    function(k);
}
请为横线处选择合适的程序使得程序的运行结果是123 ()
A.

void *function();

B.

void *function(float);

C.

void (*function)();

D.

void (*function)(float);

题目信息
校招真题
-
正确率
0
评论
12
点击