?
What will be the output of the following C++ code?
What will be the output of the following C++ code?
#include <iostream>
#include <valarray>
using namespace std;
int main()
{
valarray<int> varr = { 10, 2, 20, 1, 30 };
cout<<"Sum of array: "<<varr.sum();
return 0;
}
#include <iostream>
#include <valarray>
using namespace std;
int main()
{
valarray<int> varr = { 10, 2, 20, 1, 30 };
cout<<"Sum of array: "<<varr.sum();
return 0;
}
Join the Discussion
Login to post a comment or share your explanation.
Login