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)- A2% (1)
- B79% (34)
- C7% (3)
- D12% (5)
Topics
#hexadecimal literals#octal literals#string concatenation#numeric type casting
Community Discussion
No community discussion yet for this question.