81.
What will be the output of the following Java program?
class Modulus 
{
    public static void main(String args[]) 
    {    
         double a = 25.64;
         int  b = 25;
         a = a % 10;
         b = b % 10;
         System.out.println(a + " "  + b);
    } 
}

87.
What would be the output of the following code snippet if variable a=10?
if(a<=0)
{
   if(a==0)
   {
     System.out.println("1 ");
   }
   else 
   { 
      System.out.println("2 ");
   }
}
System.out.println("3 ");

89.
What will be the output of the following Java program?
class selection_statements 
{
    public static void main(String args[])
    {
        int var1 = 5; 
        int var2 = 6;
        if ((var2 = 1) == var1)
            System.out.print(var2);
        else 
            System.out.print(++var2);
    } 
}

90.
What will be the output of the following Java program?
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);
 
        } 
}

Read More Section(Operators)

Each Section contains maximum 100 MCQs question on Operators. To get more questions visit other sections.