Examveda

What are the two predefined FILE pointers in C?

A. console and error

B. stdout and stdio

C. stdout and stderr

D. stdio and stderr

E. console and stdio.

Answer: Option C

Solution (By Examveda Team)

Besides the file pointers which we explicitly open by calling fopen, there are also three predefined streams. stdin is a constant file pointer corresponding to standard input, and stdout is a constant file pointer corresponding to standard output. Both of these can be used anywhere when a file pointer is called for; for example, getchar() is the same as getc(stdin) and putchar(c) is the same as putc(c, stdout). The third predefined stream is stderr. Like stdout, stderr is typically connected to the screen by default. The difference is that stderr is not redirected when the standard output is redirected.


This Question Belongs to C Program >> File Input Output

Join The Discussion

Related Questions on File Input Output