Vidyalelo
C++ Programming · Q129

Functions and Procedures in C++

Programming · C++ Programming · question 129

Q129

What will be the output of the following C++ code? #include using namespace std; void square (int *x, int *y) *x = (*x) * --(*y); int main ( ) int number = 30; square(&number, &number); cout << number; return 0;

A.
870
Answer
B.
30
C.
Error
D.
Segmentation fault

Answer: Option A

Solution

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