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.
Anirudh said:
1 decade ago
Compiler will not be able to distinguish among the functions.
Shriram said:
1 decade ago
There is ambiguity occur while calling the BixTest function so the compiler generate compile time error.
Pandko said:
1 decade ago
Compiler confused which function to call so it gives compile time error.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers