1.

What is the output of this program in the file?
#include <iostream>
int main ()
{
freopen ("Sample.txt", "w", stdout);
printf ("This is redirected to a file");
fclose (stdout);
return 0;
}

A. This is redirected
B. Compilation Error
C. This is redirected to a file
D. Sample.txt
E. None of these
Answer» D. Sample.txt


Discussion

No Comment Found

Related MCQs