Q. What will be the output of the following Java program?

Code:
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);
    } 
}
  • (A) 5.640000000000001 5
  • (B) 5.640000000000001 5.0
  • (C) 5 5
  • (D) 5 5.640000000000001
πŸ’¬ Discuss
βœ… Correct Answer: (A) 5.640000000000001 5

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
126
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Neelam Mittal
Publisher
πŸ“ˆ
90%
Success Rate