Vidyalelo
C++ Programming · Q277

C++ miscellaneous

Programming · C++ Programming · question 277

Q277

What will be the output of the following C++ code? #include using namespace std; void square (int *x) *x = (*x + 1) * (*x); int main ( ) int num = 10; square(&num); cout << num; return 0;

A.
100
B.
compile time error
C.
144
D.
110
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board