Vidyalelo
C++ Programming · Q988

C++ miscellaneous

Programming · C++ Programming · question 988

Q988

What will be the output of the following C++ code? #include #include #include using namespace std; int main () int numbers[] = 3, -4, -5; transform ( numbers, numbers + 3, numbers, negate () ); for (int i = 0; i < 3; i++) cout << numbers[i] << " ";

A.
-3
B.
3 4 5
C.
3 -4 5
D.
-3 4 5
Answer

Answer: Option D

Solution

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