C++ Programming - Functions - Discussion
Discussion Forum : Functions - Programs (Q.No. 9)
9.
Which of the following statement is correct about the program given below?
#include<iostream.h>
int BixTest(int x, int y);
int BixTest(int x, int y, int z = 5);
int main()
{
cout<< BixTest(2, 4) << endl;
return 0;
}
int BixTest(int x, int y)
{
return x * y;
}
int BixTest(int x, int y, int z = 5)
{
return x * y * z;
}
Discussion:
13 comments Page 2 of 2.
Dipak said:
9 years ago
You will get an ambiguity error because of default argument.
Kishor ambekar said:
1 decade ago
Compiler get confused to which function is to be called.
Rushi said:
8 years ago
There is cout in main function @Dattu.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers