ISRO | ISRO CS 2017 – May | Question 40
What is the output of this C++ program?
#includeusing namespace std; void square (int *x) { *x = (*x)++ * (*x); } void square (int *x, int *y) { *x = (*x) * --(*y); } int main ( ) { int number = 30; square(&number, &number); cout << number; return 0; }
(A) 910
(B) 920
(C) 870
(D) 900
Answer: (C)
Explanation:
Quiz of this Question
Please comment below if you find anything wrong in the above post