nerdexam
National_Instruments

200-500 · Question #110

How can precisely one byte be read from a file, pointed by $fp? (Choose 2)

The correct answer is A. fread($fp, 1); D. fgetc($fp). See the full explanation below for the reasoning.

Question

How can precisely one byte be read from a file, pointed by $fp? (Choose 2)

Options

  • Afread($fp, 1);
  • Bfgets($fp, 1);
  • Cfgetss($fp, 1);
  • Dfgetc($fp);
  • EAll of the above

How the community answered

(39 responses)
  • A
    79% (31)
  • B
    3% (1)
  • C
    13% (5)
  • E
    5% (2)

Community Discussion

No community discussion yet for this question.

Full 200-500 Practice