-
What is the output of this program?
#include
#include
using namespace std;
int main ()
{
try {
double val1, val2;
istream_iteratoreos;
istream_iteratoriit (cin);
if (iit != eos)
val1 = *iit;
iit++;
if (iit != eos)
val2 = *iit;
cout << (val1 * val2) << endl;
}
catch (...) {
cout << "Unknown exception: " << endl;
}
return 0;
}
-
- Compilation Error
- Runtime Error
- Garbage Value
- It will print the multiplied value of the input
- Exception
Correct Option: D
In this program, We got the input by using istream iterator and we are manipulating in.