C-17-Q020mediumsingle_mcq
To check whether a number is even or odd, the operator used is the:
To check whether a number is even or odd, the operator used is the:
- aDivision operator
/ - bFloor-division operator
// - cModulo (remainder) operator
% - dExponent operator
**
ব্যাখ্যা
The modulo operator % returns the remainder of a division, so num % 2 gives for even numbers and for odd numbers. This makes it the standard way to test divisibility by 2.