1.

What is the function of FILE *tmpfile(void)?(a) creates a temporary file of mode “wb+”(b) creates a temporary file of mode “wb”(c) creates a temporary file of mode ” w”(d) creates a temporary file of mode “w+”I had been asked this question in an interview.My question is taken from File Operations topic in portion Input and Output in C of C

Answer»

Correct OPTION is (a) creates a temporary file of mode “wb+”

EASIEST explanation - A temporary file is CREATED by tmpfile()FUNCTION of mode“wb+” that will be automatically REMOVED when closed or when the program terminates normally.



Discussion

No Comment Found

Related InterviewSolutions