A

Admin • 833K Points
Coach

Q. What is the output of this program?

Code:
#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;
}
  • (A) 7
  • (B) 9
  • (C) 10
  • (D) 19
  • Correct Answer - Option(D)
  • Views: 27
  • Filed under category C++
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.