Question
What is the output of this 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);} }
Answer: Option A
Was this answer helpful ?
Modulus operator returns the remainder of a division operation on the operand. a = a % 10 returns 25.64 % 10 i:e 5.640000000000001. Similarly b = b % 10 returns 5.
Was this answer helpful ?
More Questions on This Topic :
Question 2. Which of these is not a bitwise operator? ....
Question 4. Which of these is returned by greater than, ....
Question 6. Which of these statement is correct? ....
Question 8. Which of these have highest precedence? ....
Submit Solution