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

Last Updated :
Discuss
Comments
Output? CPP
#include<iostream>
using namespace std;

int fun(int x = 0, int y = 0, int z)
{  return (x + y + z); }

int main()
{
   cout << fun(10);
   return 0;
}
10
0
20
Compiler Error
Share your thoughts in the comments