C++ Institute CPP Question Answer
What will happen when you attempt to compile and run the code below, assuming that you enter the following sequence: 1 2 3
#include
#include
#include
using namespace std;
int main ()
{
string s;
getline(cin, s);
stringstream input(s);
stringstream output;
for( ; !input.fail() ; )
{
int i;
input>>i;
output< } cout< return 0; } Program will output: