• Courses
  • Tutorials
  • DSA
  • Data Science
  • Web Tech

C++ | Function Overloading and Default Arguments | Question 5

Output of following program? CPP
#include <iostream>
using namespace std;

int fun(int=0, int = 0);

int main()
{
  cout << fun(5);
  return 0;
}

int fun(int x, int y) { return (x+y); }
Compiler Error
5
0
10

Get 90% Course fee refund on completing 90% course in 90 days! Take the Three 90 Challenge today.

The next 90 Days of focus & determination can unlock your full potential. The Three 90 challenge has started and this is your chance to upskill and get 90% refund. What more motivation do you need? Start the challenge right away!

Last Updated :
Share your thoughts in the comments
  翻译: