In C language, operators that require operands to be integers are% modulo operators.
The operand of the following operator must be int, the operation is a, and both variables of the remainder operator must be int.
In C, what operator's operand must be an int type% remainder operation?
> > < lt < | ~ bit operation
It is also in the switch.
Some types can be implicitly converted to int, so it looks ok.
The operands of the following operators must be integers. Choose c!
The SQLserver operand data type varchar is invalid for avg operators. Varchar cannot be used to calculate the average. Only numeric types can calculate the average value.
Can logical operators be used between Boolean data and integer data in java?
Self-increasing and self-decreasing operator This is a special operator. Self-increasing operator++and self-decreasing operator-the result of the operation on variables is increasing.
Add 1 and subtract 1. For example:
-Couter;
couter-;
++amount;
Amount++;
Look at these examples, whether the operator is in front or behind has the same influence on itself, that is, adding 1 or.
Subtract 1, but when they are part of other expressions, there is a difference between them. Operator at
Variable, then before the operation, the variable completes the self-increasing or self-decreasing operation; If the operator is placed in the.
Surface, after the variable participates in the operation of the expression, the self-increasing and self-decreasing operation is carried out. This may not be the right statement.
Obviously, please look at the following example:
num 1 = 4;
num 2 = 8;
a = ++num 1;
b = num 2++;
a = ++num 1; Generally speaking, this is an assignment, assigning the value of ++num 1 to A, because the self-increasing operator is changeable.
The quantity comes before, so num 1 first increases from 1 to 5, then assigns it to A, and finally A is also 5. b = num 2++;
This is to assign the value of num2++ to b, because the self-increasing operator is behind the variable, so num2 is assigned to b first.
B, b should be 8, and then num2 should be increased from 1 to 9.
So what should we do if this happens?
c = num 1 ++ num 2;
Is it c=(num 1++)+num2? Or c = num1+(+num2); It depends on the compiler, different
The compiler of may have different results. So try to avoid it in future programming.
The complicated situation above.
In C language, the operator that requires operands to be integers is d.%-divisible remainder operation, and both operands must be integers. B. ++-self-increasing, and non-integer can also be self-increasing. Floating a = 3.2a++;+; printf("%f\n ",a); Output 4.200000
It has the arithmetic (addition, subtraction, multiplication and division) functions of integer data and floating-point data. Enter the first operand and the operator (+,-,*,/Need a calculator?