nerdexam
Zend

200-710 · Question #198

What is the output of the following code? echo '0x33, ' monkeys sit on ', 011, ' trees.';

The correct answer is B. 51 monkeys sit on 9 trees. See the full explanation below for the reasoning.

Data Formats & Types

Question

What is the output of the following code? echo '0x33, ' monkeys sit on ', 011, ' trees.';

Options

  • A33 monkeys sit on 11 trees.
  • B51 monkeys sit on 9 trees.
  • Cmonkeys sit on trees.
  • D0x33 monkeys sit on 011 trees.

How the community answered

(43 responses)
  • A
    2% (1)
  • B
    79% (34)
  • C
    7% (3)
  • D
    12% (5)

Topics

#hexadecimal literals#octal literals#string concatenation#numeric type casting

Community Discussion

No community discussion yet for this question.

Full 200-710 Practice