OA. free
Free
AMI Core Computer Science Core Computer Science Medium

In C file I/O, which condition correctly checks for the end of file when reading character...

AMI technical mcq question, verified with a worked answer. Free to practise - no sign-up.

In C file I/O, which condition correctly checks for the end of file when reading character by character using fgetc(fp)?

Choose one option.
Show answer & explanation
Answer: A. (ch = fgetc(fp)) != EOF

Standard evaluation according to engineering and computational science principles.

Step-by-step Derivation:
Step 1: Analyze problem specification.
Step 2: Derive theoretical solution.
Step 3: Select corresponding answer option.