What happens when you attempt to compile and run the following code?#include <deque>#include <list>#include <iostream>using namespace std;int main (){list<int>l1;deque<int>d1;for(int i=0; i<5; i++){l1.push_back(i);l1.push_front(i);d1.push_back(i);d1.push_front(i);}for(int i=0; i<d1.size(); i++){cout<<d1<<" "<<l1<<" ";}cout<<endl;return 0;}
A. program displays 4 4 3 3 2 2 1 1 0 0 0 0 1 1 2 2 3 3 4 4
B. runtime exception
C. compilation error due to line 11
D. compilation error due to line 12 E. compilation error due to line 16
What happens when you attempt to compile and run the following code?#include <deque>#include <list>#include <iostream>us
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
What happens when you attempt to compile and run the following code?#include <deque>#include <list>#include <iostream>us
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!