Multiple choice technology programming languages

How many numbers are printed, when the following JSTL code fragment is executed? Select the one correct answer. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> ${item} a)1 b)5 c)6 d)11

  1. 1

  2. 5

  3. 6

  4. 11

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

The loop starts at 0 and ends at 10 with a step of 2. The values generated are 0, 2, 4, 6, 8, and 10. Counting these values results in exactly 6 numbers being printed. Option C is correct because the end value (10) is inclusive.