Answer to Question #231914 in C++ for xyz

Question #231914

what is the program output/errors

#include<iostream>

  using namespace std;

   int fun (int x, int y) 

   {

return x + y;

   }

double fun (int x, int y)

return x * y; 

}

int main() 

{

cout<<fun(5, 10); 

return 0; 

 

}


1
Expert's answer
2021-09-01T05:50:52-0400

The program error is an ambiguating the new declaration of 'double fun(int, int)'.

Where the old declaration 'int fun(int, int)'.


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS