Q. What is the output of this program?
Code:
public class Result
{
public static void main(String args[])
{
int p , q = 1;
p = 20;
if(p != 20 && p / 0 == 0)
System.out.println(q);
else
System.out.println(++q);
}
}
β
Correct Answer: (C)
2