Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Does the operand in C language have to be an integer?
Does the operand in C language have to be an integer?

In the C language, the operators whose operands must be integer numbers are:

①Remainder operator%

②Bitwise operator~, &, |, ^, <<, >>.

The specific reasons are:

①The remainder operation must be of integer type because the remainder is an operation in integer division. As shown in the figure

② Bit operations must be of integer type because bit operations operate on bits in integers. As shown in the picture

C language is a general computer programming language and is widely used. The design goal of the C language is to provide a programming language that can be easily compiled, handle low-level memory, generate a small amount of machine code, and can run without any runtime environment support.