If int a=55,b=9, c=0; and c=a%b, the value stored in c will be
Answers
Answered by
1
- The value of c is 1.
Given:
> a = 55
> b = 9
• The modulo operator is used to find the remainder obtained when a number is divided by another number.
∵ 55 = 9 × 6 + 1
> c = a % b
> c = 55 % 9
> c = 1
Hence: The value of c is 1.
Operators: An operator is a symbol used to perform arithmetical or logical operations.
Types of Operators In Java:
Basically, there are three types of operators.
- Arithmetical Operator.
- Relational Operator.
- Logical Operator.
Other operators include -
- Unary, binary and ternary operator.
- Bitwise operator and so on.
Similar questions