Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Some questions for beginners of C language: 1, a=a+7=c+b Why is the grammar wrong?
Some questions for beginners of C language: 1, a=a+7=c+b Why is the grammar wrong?
Hello! 1 and the equal sign are assignment operations, which means that the left side of the equal sign must be the assigned variable. Obviously, a+7 is an expression, not a variable.

2. The plastic operation only takes the integer part, and your definitions of C 1, C2 and C3 are all integers, so; C3 = 1.0/C2 * c 1; If the operation is shaping, then only the integer part is 0.

3. Note: In the process of mixed operations such as floating-point operations and plastic operations, the system will convert all types of data into double operations, and then assign the results to the response variables as needed.

For your expression, c is float, so the final result is to convert it into float and assign it to C.

4, comma operator, also known as sequential evaluation operator, but in order to distinguish this order, the order here refers to expressions, and the comma operator is used in the form of: expression 1, expression 2, ......

That is to say, the expressions are separated by commas, so for i=(a=2*3, a*5), a+6; I=(a=2*3, a*5) is an expression, and a+6 is another expression.