C File Handling C File Handling Please wait while the activity loads. If this activity does not load, try refreshing your browser. Also, this page requires javascript. Please visit using a browser with javascript enabled. If loading fails, click here to try again Question 1Which of the following true about FILE *fpFILE is a keyword in C for representing files and fp is a variable of FILE type.FILE is a structure and fp is a pointer to the structure of FILE typeFILE is a streamFILE is a buffered streamC File Handling Discuss itQuestion 1-Explanation: fp is a pointer of FILE type and FILE is a structure that store following information about opened file. Question 2When fopen() is not able to open a file, it returnsEOFNULLRuntime ErrorCompiler DependentC File Handling Discuss itQuestion 2-Explanation: fopen() returns NULL if it is not able to open the given file due to any of the reasons like file not present, inappropriate permissions, etc.Question 3getc() returns EOF whenEnd of files is reachedWhen getc() fails to read a characterBoth of the aboveNone of the aboveC File Handling Discuss itQuestion 3-Explanation: See EOF, getc() and feof() in CQuestion 4In fopen(), the open mode "wx" is sometimes preferred "w" because. 1) Use of wx is more efficient. 2) If w is used, old contents of file are erased and a new empty file is created. When wx is used, fopen() returns NULL if file already exists. Only 1Only 2 Both 1 and 2Neither 1 nor 2C File Handling Discuss itQuestion 4-Explanation: See http://www.geeksforgeeks.org/fopen-for-an-existing-file-in-write-mode/Question 5 fseek() should be preferred over rewind() mainly becauserewind() doesn\'t work for empty filesrewind() may fail for large filesIn rewind, there is no way to check if the operations completed successfullyAll of the aboveC File Handling Discuss itQuestion 5-Explanation: Please see fseek() vs rewind() in C 1 There are 5 questions to complete. You have completed questions question Your accuracy is Correct Wrong Partial-Credit You have not finished your quiz. If you leave this page, your progress will be lost. Correct Answer You Selected Not Attempted Final Score on Quiz Attempted Questions Correct Attempted Questions Wrong Questions Not Attempted Total Questions on Quiz Question Details Results Date Score Hint Time allowed minutes seconds Time used Answer Choice(s) Selected Question Text Need more practice! Keep trying! Not bad! Good work! Perfect! Last Updated : 10 Mar, 2018 Share your thoughts in the comments Add Your Comment Please Login to comment...