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;
}
Discussion:
16 comments Page 2 of 2.
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)
Patel Ravi said:
1 decade ago
Nice programming language.
Jaideep gupta said:
10 years ago
Ya I computed in the values written in main function overwritten the values present in bix function.
Sindhu said:
8 years ago
What does the Bixfunction (20, 10) mean ?
If it indicates x=20, y=10, but y=5 was given in declaration ?
If it indicates x=20, y=10, but y=5 was given in declaration ?
(1)
Gopi said:
5 years ago
Gives error.
use #include<iostream> instead #include<iostream.h>
use #include<iostream> instead #include<iostream.h>
Srijan s said:
4 years ago
I think there will be an error as there are only two parameters passed where as in function definition we can clearly see there are 3 variables.
(1)
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers