This post contains 141-150 questions of c program. It will helpful to solve c aptitude questions, c quiz , c objective type questions etc in interview.
141-150 Questions
Q1:ferror function is used to find _________________ errors a) logical b) file opening c) data d) all the above Answer:
Q2:
The contents of the file are lost if it is opened in _______ mode a) a b) w c) w+ d) a+ Answer:
Q3:
The contents of the file are safe if it is opened in _________ mode a) a b) r c) a+b d)all the above Answer:
Q4:
The valid binary modes of operation are a) ab b) rb+ c) wb+ d)ab+ Answer:
Q5:
rewind function is used to a) reset the file pointer b) point it to the end of the file c) stay at current position d)none of the above Answer:
Q6:
feof function checks for a) file opening error b) data error c) end of file d) file closing error Answer:
Q7:
The value returned by fopen() function when the file is not opened a) 0 b) garbage value c) NULL d) none of the above Answer:
Q8:
The fcloseall() function performs a) closing of all the files b) closes all the files that are opened by that program c) closes only specified files d) none of the above Answer:
Q9:
The function that is not used for random access to files is a) rewind b) ftell c) fseek d) fprintf Answer:
Q10:
main() { main(); } Answer: Runtime error : Stack overflow.