61
What will be the output of the following C++ code?
#include <iostream>
#include <Valarray>
using namespace std;
int main()
{
Valarray<int> varr = { 1, 2, 3, 4, 5 };
for (int &x: varr) cout << x << " ";
cout<<endl;
varr = varr.shift(2);
for (int &x: varr) cout << x << " ";
return 0;
} Answer & Solution
Answer: Option
A
No explanation is given for this question. Let's Discuss on Board