Q. What is the output of the following C++ code?
Code:#include <iostream>
using namespace std;
void carree(int *x)
{
*x = (*x + 1) * (*x);
}
int main()
{
int n = 10;
carree(&n);
cout << n;
return 0;
}
β
Correct Answer: (B)
110