Input / Output - General Questions :: Discussion


11.What will be the content of 'file.c' after executing the following program?
A.B
B.B B
C.A B
D.Error in opening file 'file1.c'
Answer:  Option  A
Explanation:

Here fputc('A', fp1); stores 'A' in the file1.c then fputc('B', fp2); overwrites the contents of the file1.c with value 'B'. Because the fp1 and fp2 opens the file1.c in write mode.

Hence the file1.c contents is 'B'.

Tutorial Link:
Published by:Michael Daani

Comments are not available

Post your comments here:

Optional

Date to Date Current Affairs 2022

PakMCQs.net

Quick Links

GAT Subject



   Computer Science    English Mcqs    Agriculture    

Engineering



   Computer Science    Civil Engineering    

Technical



   Networking    Electronics    Database    

Past Papers



   Model Papers    FPSC Papers