Computer Science, asked by soumahitech, 11 months ago

//What does the following print

#include

#include

#include

using namespace std;

int main()

{

vector data(5,1);

int sum {0};

cout << sum << endl;

for(auto element : data)

sum += element;

cout << sum << endl;

for(auto p = ++data.begin(); p != --data.end(); ++p)

sum += *p;

cout << sum << endl;

sum = 0;

data.push_back(2);

data.push_back(3);

for(auto element : data)

sum += element;

cout << sum << endl;

cout << accumulate(data.begin(), data.end(), data[0]) << endl;

}

1.What does the first line print?
2.What does the second line print?
3.What does the third line print?
4.What does the fourth line print?
5.What does the fifth line print?

Answers

Answered by av1266108
2

Answer:

so will L do will all all all will

Similar questions