1.

What is the output of this program?

public class Result
{
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);
}
}

A. 2
B. 0
C. Compilation error
D. Runtime error
E. None of these
Answer» D. Runtime error


Discussion

No Comment Found

Related MCQs