Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Some questions about C language in computer are of great help to you ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Some questions about C language in computer are of great help to you ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Question 1: D Cause: The result of 3/2 is 1, because both sides of the division sign are integer data, the result is also plastic, and because X is a double-precision floating-point type, the C compiler system will automatically convert 1 into a double type and then participate in the operation. So the result is double data.

Question 2: Reason A: According to the priority of the operator, the result of (int)(x+y) in parentheses is 7, and then the plus sign is calculated from left to right, because the priority is the same, the result is 0, plus x, the final result is 2.5.

Question 3: C Reason: There is nothing to explain this, just remember it.

Question 4: One reason: Same as above.

Question 5: B Cause: There must be a variable on the left of the assignment operator, not an expression, so d is wrong. The operand of the% operator must be integer data, so C is wrong. There is no: = operator in C language, so A is wrong.

Question 6: C Cause: Character constants should be enclosed in single quotation marks.

Question 7: a c Reason: C supports two annotation methods: one is multi-line annotation that starts with/* and ends with */,and the other is single-line annotation that starts with//.

Question 8: C Cause: This is determined by the type conversion rules of the C compiler system, and all data are subject to double-precision floating-point types.

Question 9: One reason: The first job of C language compiler is to check syntax errors, not logic errors.

Question 9: One reason:' \72' is an escape character, which means that the ascii code value is octal number 72, that is, the character represented by decimal number 58.

Question 10: B reason: just remember.

Question 1 1: One reason: void means empty, that is, there is no return value.

Question 12: I can't see your question clearly, but just remember that the number at the beginning of 0 is octal and cannot be greater than seven, and the number at the beginning of 0x is hexadecimal and cannot be greater than f.

Question 13: b d Reason: A is a relational expression, B is a statement, C is illegal, the left side of the assignment operator must be a variable, and D is correct.

Question 14: C Cause: The suffix of the target file is. After obj is compiled, the suffix of the executable file is. Please run after connecting.

These are the most basic things. You'd better read more textbooks. I hope it will help you.