1.

What is the output of this program?
#include <iostream>
#include <iterator>
#include <list>
using namespace std;
int main ()
{
list<int> DataList;
for (int k = 0; k < 8; k++)
DataList.push_back (k * 8);
list<int> :: iterator Iter = DataList.begin();
advance (Iter, 6);
cout << *Iter << endl;
return 0;
}

A. Compilation Error
B. 8
C. Runtime Error
D. 48
E. None of these
Answer» E. None of these


Discussion

No Comment Found

Related MCQs