+ 2
How does it work?
It's answer is 2 tell me how #include<iostream.h> void f(int) { cout<<"1"; } void f(double) { cout<<"2"; } void f(float) { cout<<"3"; } int main() { f(1.0); }
5 Answers
+ 4
A floating point literal by default is a `double`, except a notation was added to define it as a `float` e.g. 1.0f
The function accepting double parameter is thus the one that be invoked.
+ 3
It's C++ not java
+ 2
it true f(1,0)
+ 2
for which code foating point
+ 2
no function is at extrem in float expt ot java