nerdexam
National_Instruments

200-500 · Question #100

What is the output of the following code? $a = 1; ++$a; $a*=$a; echo $a--;

The correct answer is A. 4. See the full explanation below for the reasoning.

Question

What is the output of the following code? $a = 1; ++$a; $a*=$a; echo $a--;

Options

  • A4
  • B3
  • C5
  • D0
  • E1

How the community answered

(31 responses)
  • A
    81% (25)
  • B
    6% (2)
  • C
    10% (3)
  • D
    3% (1)

Community Discussion

No community discussion yet for this question.

Full 200-500 Practice