C++ Programming - Functions - Discussion

Discussion Forum : Functions - Programs (Q.No. 1)
1.
What will be the output of the following program?
#include<iostream.h>
long BixFunction(int x, int y = 5, float z = 5)
{
    return(++x * ++y + (int)++z);
}
int main()
{
    cout<< BixFunction(20, 10); 
    return 0;
}
237
242
240
35
The program will report error on compilation.
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
16 comments Page 2 of 2.

Gopi said:   5 years ago
Gives error.

use #include<iostream> instead #include<iostream.h>

Aish said:   1 decade ago
See in float z = 5.0 then in int z = 5 we can take like this. I am right?
(1)

Dev said:   1 decade ago
There is "No ERROR" and 237 is the correct answer described by '@Bala'.

Ranjith said:   1 decade ago
Please any one explain me, how this method takes two arguments?

Patel Ravi said:   1 decade ago
Nice programming language.

Vinay said:   1 decade ago
Why not error?


Post your comments here:

Your comments will be displayed after verification.