Q. What is the output of this program?
Code:
#include
using namespace std;
void function(int num1, int num2 = 12)
{
cout << "1st Number: " << num1<
cout << "2nd Number: " << num2<
}
int main()
{
function(2);
function(5, 7);
return 0;
}
β
Correct Answer: (D)
1st Number: 2 2nd Number: 12 1st Number: 5 2nd Number: 7