26.7k views
0 votes
If num is an int which expression always evaluates to true if num holds an odd number

1 Answer

1 vote

num%2==1

The modulo operator (%) divides the left hand side by the right hand side and returns the remainder. When dividing an odd number by 2 there will always be a remainder of 1.

User Mike Brind
by
7.8k points