-
What is the output of this program?
public class Result
{
public static void main(String args[])
{
int p,q,r,s;
p=q=r=s=10;
p+=q-=r*=s/=10;
System.out.println(p+" "+q+" "+r+" "+s);
}
}
-
- 20 0 20 1
- 10 0 10 1
- 10 0 0 10
- 20 0 0 20
- 10 10 0 1
Correct Option: B
Expression will evaluate from right to left.
output: 10 0 10 1