File Input Output - Study Mode
[#16] Which one of the following is correct syntax for opening a file.
Correct Answer
(A) FILE *fopen(const *filename, const char *mode)
[#17] What will cos(x) return?
Correct Answer
(C) cosine of x where x is in radians
[#18] Choose the right statement for fscanf() and scanf()
Correct Answer
(B) fscanf() can specifies a stream from which to read whereas scanf() can read only from standard input
[#19] What is the function of the mode ' w+'?
Correct Answer
(B) create text file for update, discard previous contents if any
[#20] gets() does the following when it reads from stdin.
Correct Answer
(C) Deletes the terminating 'n'