1.

What is the output of this program?

public class comma_operator
{
public static void main(String args[])
{
int sum = 0;
for (int k = 0, L = 0; k < 10 & L < 10; ++k, L = k + 1)
sum += k;
System.out.println(sum);
}
}

A. 46
B. 36
C. 26
D. 56
E. None of these
Answer» C. 26


Discussion

No Comment Found