We need to make the printf function write output on a file instead of console without involving any other function like fprintf etc.
As I understand, 1st half of the solution would be to close the console output file pointer so that printf is disabled to write any thing on console.
What next needs to be done (in C not C++) to force printf to print output on file ?
Had this been C++, would function overriding solve this purpose ?