单项选择题

有如下程序: #include<iostream> using namespace std; int main() { void function(double val); double val; function(val); cout<<val; return 0; } void function(double val) { val= 3; } 编译运行这个程序将出现的情况是( )。

A.编译出错,无法运行
B.输出:3
C.输出:3.0
D.输出一个不确定的数