-
What is the output of this program?
#include
using namespace std;
int add(int p, int q);
int main()
{
int k = 7, L = 9;
cout << add(k, L) << endl;
return 0;
}
int add(int p, int q )
{
int sum = p + q;
p = 10;
return p + q;
}
-
- 7
- 9
- 10
- 19
- None of these
Correct Option: D
The value of a has been changed to 10, So it returns as 19.