-
What is the output of this program?
#include <iostream>
#include <deque>
using namespace std;
int main ()
{
deque<int> Data;
int Addition (0);
Data.push_back ( 35 );
Data.push_back ( 56 );
Data.push_back ( 44 );
while (!Data.empty())
{
Addition += Data.back();
Data.pop_back();
}
cout << Addition << '\n';
return 0;
}
-
- 35
- 56
- 44
- 135
- None of these
Correct Option: D
In this program, We are adding all the values in the queue.