Page 1 of 1

What will be the output of the following C++ code in the text file?

Posted: Wed Jul 13, 2022 7:53 pm
by answerhappygod
#include <stdio.h> int main () { FILE * pFile; char c; pFile = fopen("sample.txt", "wt"); for (c = 'A'; c <= 'E'; c++) { putc (c, pFile); } fclose (pFile); return 0; }
a) ABCD
b) ABC
c) ABCDE
d) ADC