Which function is used to close a file in C?
- open()
- close()
- fclose()
- endfile()
Explanation
- fclose() returns 0 on success and EOF (-1) on failure.
- It flushes any buffered data to the file before closing the stream
For the standard input/output streams (stdin, stdout, stderr),
Related MCQs
- True
- False
- Partially True
- None of these
اس سوال کو وضاحت کے ساتھ پڑھیں
مندرجہ ذیل میں سے ڈیٹا پروسیسنگ کی درست ترتیب کون سی ہے؟
- Input → Processing → Output → Storage
- Processing → Input → Storage → Output
- Storage → Input → Processing → Output
- None of these
اس سوال کو وضاحت کے ساتھ پڑھیں
- --
- ++
- +=
- **
اس سوال کو وضاحت کے ساتھ پڑھیں
- A = B + B
- A = A + B
- A = A - B
- A = B - A
اس سوال کو وضاحت کے ساتھ پڑھیں
- open()
- close()
- fclose()
- endfile()