Multiple choice technology programming languages

$input = “bc999”; print ++$input;

  1. bc999

  2. bd000

  3. bc100

  4. cd100

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

String increment on 'bc999' increments the last character: 9 becomes 0 with carry. This propagates through all three 9s, then 'c' increments to 'd'. Result is 'bd000'.