What happens when you attempt to compile and run the following code?
#include <iostream>
using namespace std;
int op(int x, int y)
{
int i;
i = x + y;
return i;
}
int main()
{
int i=1, j=2, k, l;
k = op(i, j);
l = op(j, i);
cout<< k << "," << l;
return 0;
}
- It prints: 1,2
- It prints: ?1,1
- It prints: 1,1
- It prints: 3,3
Show Answer
Next Question