Multiple choice technology web technology

Check the below snippet 1<% for(int i=0;i<=5;i++){%> 2<%=i;%> 3<%}%> 4.<% out.println(i);%>

  1. 1

  2. 3

  3. 2

  4. 4

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

This is an ASP.NET-style code snippet. Lines 1-3 are server-side code that executes, while line 4 with '.' is invalid syntax. After the loop completes, i=6, but the output on line 2 is '2' (the last value printed).