Vidyalelo
C++ Programming · Q64

C++ miscellaneous

Programming · C++ Programming · question 64

Q64

What will be the output of the following C++ code? #include #include using namespace std; int main() valarray varr = 10, 2, 20, 1, 30 ; cout<<"Sum of array: "<<varr.sum(); return 0;

A.
Sum of array: 20
B.
Sum of array: 53
C.
Sum of array: 12
D.
Sum of array: 63
Answer

Answer: Option D

Solution

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