Question
1.
#include
2.
using namespace std;
3.
void Values(int n1, int n2 = 10)
4.
{
5.
using namespace std;
6.
cout
What is the output of this program?
1.
#include
2.
using namespace std;
3.
void Values(int n1, int n2 = 10)
4.
{
5.
using namespace std;
6.
cout
Answer: Option B
Was this answer helpful ?
Answer: (a)
Explanation: In this program, We are passing the values as by default values rules it is working.
Output:
$ g++ def2.cpp
$ a.out
1st value: 1
2nd value: 10
1st value: 3
2nd value: 4
Was this answer helpful ?
Submit Solution