1.

What is the output of this program?
 #include <iostream>
#include <iterator>
#include <list>
using namespace std;
int main ()
{
list<int> DataList;
for (int i = 0; i < 10; i++)
DataList.push_back (i * 30);
list<int> :: iterator firstIter = DataList.begin();
list<int> :: iterator lastIter = DataList.end();
cout << distance(firstIter, lastIter) << endl;
return 0;
}

A. 10
B. 30
C. Compilation Error
D. All of above
E. None of these
Answer» C. Compilation Error


Discussion

No Comment Found

Related MCQs