1.

What is the output of this program?
#include <iostream>
#include <string>
using namespace std;
int main ()
{
string str ("Testing str...");
for ( string :: iterator Iter = str.begin(); Iter != 5; ++Iter)
cout << *Iter;
return 0;
}

A. Compilation Error
B. Testing str...
C. Runtime Error
D. Garbage value
E. None of these
Answer» B. Testing str...


Discussion

No Comment Found

Related MCQs