πŸ“Š JAVA
Q. What will be the output of the following Java program?
Code:
class Output 
{
        public static void main(String args[]) 
        {    
             int a,b,c,d;
             a=b=c=d=20;
            a+=b-=c*=d/=20;
           System.out.println(a+" "+b+" "+c+" "+d);
 
        } 
}
  • (A) compile time error
  • (B) runtime error
  • (C) a=20 b=0 c=20 d=1
  • (D) none of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (C) a=20 b=0 c=20 d=1

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
85
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Kiran Rapria
Publisher
πŸ“ˆ
81%
Success Rate