Q: 19
What happens when you attempt to compile and run the following code?
#include
#include
#include
using namespace std;
int main ()
{
listl1;
dequed1;
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[i]<<" "<<l1[i]<<" ";
}
cout<<endl;
return 0;
}
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.