Home >Common Problem >What is the operator in C language whose operand must be an integer?
In C language, the operand of modular operation (ie remainder operation %) must be integer data (constant, variable or expression).
Modular operation is what is called remainder in mathematics. This operation must require the operands to be integers. (Recommended Learning: PHPSTORM )
This specific reason is:
1, the calculation of the remaining is the operation in integer division. The remainder is the undivided portion of the dividend in integer division. For example, if 23 is divided by 5, the quotient is 4 and the remainder is 3.
2. Bit operations must be of integer type because bit operations operate on bits in integers. As shown in the picture:
The above is the detailed content of What is the operator in C language whose operand must be an integer?. For more information, please follow other related articles on the PHP Chinese website!