1.

Choose the right statement for fscanf() andscanf()(a) fscanf() can read from standard input whereas scanf() specifies a stream from which to read(b) fscanf() can specifies a stream from which to read whereas scanf() can read only from standard input(c) fscanf() and scanf() has no difference in their functions(d) fscanf() and scanf() can read from specified streamI had been asked this question in examination.I want to ask this question from File Operations topic in division Input and Output in C of C

Answer» CORRECT option is (b) fscanf() can SPECIFIES a stream from which to read whereas scanf() can read only from standard input

Explanation: The fscanf() is similar to the scanf() function, except that the FIRST ARGUMENT of fscanf() specifies a stream from which to read whereas scanf() can read from standard input.


Discussion

No Comment Found

Related InterviewSolutions