下⾯C++代码执⾏后输出是( )。
1 int foo(float *f) 2 { 3 return int(*f*2); 4 } 5 6 int main() 7 { 8 float fnum[10]={1.1}; 9 fnum[1]=foo(fnum); 10 cout << fnum[0]+fnum[1] << endl; 11 12 cout << endl; 13 return 0; 14 }
1
1.1
3
3.1