Which of the following true about FILE *fp
(A) FILE is a keyword in C for representing files and fp is a variable of FILE type.
(B) FILE is a structure and fp is a pointer to the structure of FILE type
(C) FILE is a stream
(D) FILE is a buffered stream
Answer: (B)
Explanation: fp is a pointer of FILE type and FILE is a structure that store following information about opened file.
typedef struct { int level; /* fill/empty level of buffer */ unsigned flags; /* File status flags */ char fd; /* File descriptor */ unsigned char hold; /* Ungetc char if no buffer */ int bsize; /* Buffer size */ unsigned char *buffer; /* Data transfer buffer */ unsigned char *curp; /* Current active pointer */ unsigned istemp; /* Temporary file indicator */ short token; /* Used for validity checking */}FILE; |
chevron_right
filter_none
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
Recommended Posts:
- C | File Handling | Question 2
- C | File Handling | Question 3
- C | File Handling | Question 4
- C | File Handling | Question 5
- Four File Handling Hacks which every C/C++ Programmer should know
- Basics of File Handling in C
- Basics of File Handling in C#
- C program to copy contents of one file to another file
- C program to check whether the file is JPEG file or not
- C++ | Exception Handling | Question 1
- C++ | Exception Handling | Question 3
- C++ | Exception Handling | Question 4
- C++ | Exception Handling | Question 5
- C++ | Exception Handling | Question 6
- C++ | Exception Handling | Question 7
- C++ | Exception Handling | Question 8
- C++ | Exception Handling | Question 9
- C++ | Exception Handling | Question 10
- C++ | Exception Handling | Question 11
- C++ | Exception Handling | Question 12

