which of the following is used to find the sum of vector container code example
Example 1: sum of vector c++
accumulate(a.begin(), a.end(), 0);
Example 2: sum of elements in c++ stl
accumulate(a.begin(), a.end(), 0)
accumulate(a.begin(), a.end(), 0);
accumulate(a.begin(), a.end(), 0)