LogiQuest
Back to STL
6

What will be the output of the program?

#include <iostream>
using namespace std;
#include <vector>
#include <numeric>
int main() {
    vector<int> v = {1, 2, 3, 4};
    cout << accumulate(v.begin(), v.end(), 10) << endl;
    return 0;
}
Medium

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.