1.

By seeing which operator thus this program stops getting the input?
#include <iostream>
#include <fstream>
using namespace std;
int main ()
{
char ch;
streambuf * pbuf;
ofstream os ("Example.txt");
pbuf = os.rdbuf();
do {
ch = cin.get();
pbuf -> sputc(ch);
} while (ch != '.');
os.close();
return 0;
}

A. $ symbol
B. dot operator
C. insertion operator
D. All of above
E. None of these
Answer» C. insertion operator


Discussion

No Comment Found

Related MCQs