Computer Science, asked by kalaivanivasudha123, 10 months ago

What is the output of the program?
#include <iostream>
#include <string>
using namespace std;
int checking (int x = 7, int y)
{
return x + y;
}
int main()
{
cout « checking (5, 6);
return 0;
}
a. 13
b. Run time error
c. 11
d. Compile time error​

Answers

Answered by Imblank
11

Answer:

c.11

the function will return the value of checking

Answered by faizanurrahman838
4

Answer:

option D.

Explanation:

checking function is defined in the wrong way..it should be int checking(int x, int y=someDefaultValue)

default parameter never come before normal parameter that are resolved at runtime.

it will trough a compile-time error ⚠️

Similar questions