Correct Answer: =
Explanation: The = operator is used to assign a value to a variable in C. The == operator is used for comparison.
Correct Answer: 11
Explanation: In C, the multiplication operator (*) has higher precedence than the addition operator (+), so the expression evaluates to 5 + (3 * 2) = 5 + 6 = 11.
Correct Answer: ++
Explanation: The ++ operator is used to increment the value of a variable by 1 in C.
Correct Answer: condition ? expr1 : expr2;
Explanation: The conditional operator in C has the syntax condition ? expr1 : expr2, which evaluates expr1 if the condition is true, and expr2 if the condition is false.
Correct Answer: &&
Explanation: The && operator is used for logical AND in C, which returns true if both operands are true.
Correct Answer: 1
Explanation: The % operator in C is the modulus operator, which returns the remainder of the division. 10 % 3 equals 1 because 10 divided by 3 leaves a remainder of 1.
Correct Answer: ()
Explanation: The parentheses operator (()) has the highest precedence in C, which allows expressions within parentheses to be evaluated first.
Correct Answer: true
Explanation: The expression (a > b) && (b > c) evaluates to (5 > 3) && (3 > 1), which is true && true, resulting in true.
Correct Answer: |
Explanation: The | operator is used for bitwise OR in C, which performs the OR operation on corresponding bits of two operands.
Correct Answer: -6
Explanation: The ~ operator is the bitwise NOT operator in C, which inverts all bits of the operand. ~5 results in the binary inversion of 00000101 to 11111010, which is -6 in two’s complement representation.
Correct Answer: +
Explanation: The + operator is used for addition in C, which sums the values of two operands.
Correct Answer: 5
Explanation: The – operator is used for subtraction in C, so 7 – 2 evaluates to 5.
Correct Answer: 12
Explanation: The * operator is used for multiplication in C, so 4 * 3 evaluates to 12.
Correct Answer: /
Explanation: The / operator is used for division in C, which divides the value of the left operand by the value of the right operand.
Correct Answer: 5
Explanation: The / operator is used for division, so 10 / 2 evaluates to 5.
Correct Answer: %
Explanation: The % operator is used to find the remainder of a division in C.
Correct Answer: 3
Explanation: The % operator returns the remainder of the division, so 15 % 4 evaluates to 3.
Correct Answer: 40
Explanation: Parentheses have the highest precedence, so (8 + 2) is evaluated first, resulting in 10. Then, 10 * 5 equals 40.
Correct Answer: 4
Explanation: The * operator has higher precedence than -, so the expression is evaluated as 10 – (3 * 2) = 10 – 6 = 4.
Correct Answer: 2
Explanation: In C, when both operands are integers, the / operator performs integer division, so 12 / 5 evaluates to 2.
Correct Answer: 10
Explanation: The * operator has higher precedence than + and -, so the expression is evaluated as 3 + (4 * 2) – 1 = 3 + 8 – 1 = 10.
Correct Answer: *, %, +, –
Explanation: In C, the multiplication (*) and modulus (%) operators have higher precedence than addition (+) and subtraction (-).
Correct Answer: 2
Explanation: The % operator returns the remainder of the division, so 14 % 3 evaluates to 2.
Correct Answer: 6
Explanation: In C, the / and * operators have the same precedence and are evaluated from left to right, so 9 / 4 equals 2 (integer division), and 2 * 3 equals 6.
Correct Answer: 1
Explanation: Parentheses have the highest precedence, so (5 + 3) is evaluated first, resulting in 8. Then, 8 % 4 equals 0.
Correct Answer: 9
Explanation: The / operator has higher precedence than +, so the expression is evaluated as 7 + (5 / 2) = 7 + 2 = 9.
Correct Answer: 16
Explanation: The / operator has higher precedence than -, so the expression is evaluated as 18 – (4 / 2) = 18 – 2 = 16.
Correct Answer: 15
Explanation: The * and / operators have higher precedence than +, so the expression is evaluated as 10 + (2 * 5) / 2 = 10 + 10 / 2 = 10 + 5 = 15.
Correct Answer: 18
Explanation: The / and * operators have higher precedence than +, so the expression is evaluated as (8 / 4) + (6 * 3) = 2 + 18 = 20.
Correct Answer: 2
Explanation: The % operator has higher precedence than +, so the expression is evaluated as (8 % 3) + 1 = 2 + 1 = 3.
Correct Answer: 7
Explanation: The / and * operators have higher precedence than -, so the expression is evaluated as (20 / 4) * 2 – 3 = 5 * 2 – 3 = 10 – 3 = 7.
Correct Answer: 1
Explanation: The * and % operators have the same precedence and are evaluated from left to right, so the expression is evaluated as (4 * 2) % 3 = 8 % 3 = 2.
Correct Answer: 16
Explanation: Parentheses have the highest precedence, so (6 / 2) is evaluated first, resulting in 3. Then, the expression is evaluated as 7 + 3 * 3 = 7 + 9 = 16.
Correct Answer: 21
Explanation: Parentheses have the highest precedence, so (2 + 3) is evaluated first, resulting in 5. Then, the expression is evaluated as 5 * 5 – 4 / 2 = 25 – 2 = 23.
Correct Answer: 12
Explanation: Parentheses have the highest precedence, so (9+ 3) is evaluated first, resulting in 12. Then, the expression is evaluated as 12 / 3 * 2 = 4 * 2 = 8.
Correct Answer: 12
Explanation: The * and / operators have higher precedence than + and -, so the expression is evaluated as 6 – 2 + (3 * 4) / 2 = 6 – 2 + 6 = 4 + 6 = 10.
Correct Answer: 5
Explanation: The % operator has higher precedence than +, so the expression is evaluated as (15 % 6) + 2 = 3 + 2 = 5.
Correct Answer: 6
Explanation: The * and % operators have higher precedence than +, so the expression is evaluated as 2 + (3 * 4) % 5 = 2 + 12 % 5 = 2 + 2 = 4.
Correct Answer: 1
Explanation: The / and % operators have higher precedence than -, so the expression is evaluated as (8 / 2) – (5 % 3) = 4 – 2 = 2.
Correct Answer: 5
Explanation: The * and / operators have higher precedence than -, so the expression is evaluated as 7 – (5 * 2) / 4 = 7 – 10 / 4 = 7 – 2 = 5.
Correct Answer: ==
Explanation: The == operator is used to check if two values are equal in C.
Correct Answer: true
Explanation: The > operator checks if the left operand is greater than the right operand, so 5 > 3 evaluates to true.
Correct Answer: !=
Explanation: The != operator is used to check if two values are not equal in C.
Correct Answer: true
Explanation: The <= operator checks if the left operand is less than or equal to the right operand, so 7 <= 7 evaluates to true.
Correct Answer: <
Explanation: The < operator is used to check if the left operand is less than the right operand in C.
Correct Answer: false
Explanation: The == operator checks if two values are equal, so 9 == 10 evaluates to false.
Correct Answer: 10 <= 10
Explanation: The <= operator checks if the left operand is less than or equal to the right operand, so 10 <= 10 evaluates to true.
Correct Answer: false
Explanation: The >= operator checks if the left operand is greater than or equal to the right operand, so 4 >= 6 evaluates to false.
Correct Answer: >=
Explanation: The >= operator is used to check if the left operand is greater than or equal to the right operand in C.
Correct Answer: true
Explanation: The != operator checks if two values are not equal, so 15 != 20 evaluates to true.
Correct Answer: 3 != 3
Explanation: The != operator checks if two values are not equal, so 3 != 3 evaluates to false.
Correct Answer: false
Explanation: The < operator checks if the left operand is less than the right operand, so 12 < 9 evaluates to false.
Correct Answer: <=
Explanation: The <= operator is used to check if two values are equal or if the left operand is less than the right operand in C.
Correct Answer: true
Explanation: The && operator is the logical AND operator, so 8 > 2 && 3 < 4 evaluates to true && true, resulting in true.
Correct Answer: true
Explanation: The && operator is the logical AND operator, so 10 == 10 && 5 != 6 evaluates to true && true, resulting in true.
Correct Answer: 9 == 9
Explanation: The == operator checks if two values are equal, so 9 == 9 evaluates to true.
Correct Answer: true
Explanation: The || operator is the logical OR operator, so 2 < 3 || 4 > 5 evaluates to true || false, resulting in true.
Correct Answer: >
Explanation: The > operator is used to check if the left operand is greater than the right operand in C.
Correct Answer: false
Explanation: The <= operator checks if the left operand is less than or equal to the right operand, so 11 <= 10 evaluates to false.
Correct Answer: 3 < 2
Explanation: The < operator checks if the left operand is less than the right operand, so 3 < 2 evaluates to false.
Correct Answer: false
Explanation: The && operator is the logical AND operator, so 6 >= 3 && 4 < 2 evaluates to true && false, resulting in false.
Correct Answer: 9 >= 9
Explanation: The >= operator checks if the left operand is greater than or equal to the right operand, so 9 >= 9 evaluates to true.
Correct Answer: true
Explanation: The || operator is the logical OR operator, so 14 != 14 || 7 == 7 evaluates to false || true, resulting in true.
Correct Answer: <=
Explanation: The <= operator is used to check if the left operand is less than or equal to the right operand in C.
Correct Answer: true
Explanation: The && operator is the logical AND operator, so 13 > 8 && 4 == 4 evaluates to true && true, resulting in true.
Correct Answer: 8 != 9
Explanation: The != operator checks if two values are not equal, so 8 != 9 evaluates to true.
Correct Answer: true
Explanation: The || operator is the logical OR operator, so 5 < 2 || 7 > 3 evaluates to false || true, resulting in true.
Correct Answer: false
Explanation: The && operator is the logical AND operator, so 4 >= 4 && 3 != 3 evaluates to true && false, resulting in false.
Correct Answer: !=
Explanation: The != operator is used to check if two values are not equal in C.
Correct Answer: true
Explanation: The && operator is the logical AND operator, so 18 <= 20 && 10 > 5 evaluates to true && true, resulting in true.
Correct Answer: &&
Explanation: The && operator is used to represent logical AND in C.
Correct Answer: ||
Explanation: The || operator is used to represent logical OR in C.
Correct Answer: NOT
Explanation: The ! operator is used to represent logical NOT in C.
Correct Answer: false
Explanation: The expression 5 > 3 evaluates to true, and the ! operator negates it, resulting in false.
Correct Answer: 2 < 1 || 3 > 2
Explanation: The expression 2 < 1 is false, and 3 > 2 is true. Since || is logical OR, the entire expression evaluates to true.
Correct Answer: false
Explanation: The expression 4 > 2 is true, and 3 <= 1 is false. Since && is logical AND, the entire expression evaluates to false.
Correct Answer: !
Explanation: The ! operator is used to negate a logical expression in C.
Correct Answer: true
Explanation: The expression 7 == 5 is false, and the ! operator negates it, resulting in true.
Correct Answer: !(5 <= 5)
Explanation: The expression 5 <= 5 is true, and the ! operator negates it, resulting in false.
Correct Answer: true
Explanation: The expression 8 < 6 is false, and 3 == 3 is true. Since || is logical OR, the entire expression evaluates to true.
Correct Answer: It returns false if at least one operand is false.
Explanation: The && operator returns false if at least one of its operands is false; it only returns true if both operands are true.
Correct Answer: true
Explanation: The expression 5 != 5 is false, and the ! operator negates it, resulting in true.
Correct Answer: ||
Explanation: The || operator is used to combine multiple conditions where at least one must be true in C.
Correct Answer: false
Explanation: The expression 4 < 2 is false, and 2 > 1 is true. Since || is logical OR, the expression 4 < 2 || 2 > 1 evaluates to true, and the ! operator negates it, resulting in false.
Correct Answer: 2 >= 2 || 1 < 0
Explanation: The expression 2 >= 2 is true, and 1 < 0 is false. Since || is logical OR, the entire expression evaluates to true.
Correct Answer: false
Explanation: The expression 9 > 3 is true, and 2 == 2 is true. The ! operator negates 2 == 2 to false. Since && is logical AND, the entire expression evaluates to false.
Correct Answer: &&
Explanation: The && operator is used to check if both conditions are true in C.
Correct Answer: false
Explanation: The expression 6 <= 6 is true, and 3 > 4 is false. Since || is logical OR, the expression 6 <= 6 || 3 > 4 evaluates to true, and the ! operator negates it, resulting in false.
Correct Answer: !(1 != 1)
Explanation: The expression 1 != 1 is false, and the ! operator negates it, resulting in true.
Correct Answer: false
Explanation: The expression 10 != 10 is false, and 5 < 3 is false. Since || is logical OR, the entire expression evaluates to false.
Correct Answer: !
Explanation: The ! operator represents logical NOT in C.
Correct Answer: false
Explanation: The expression 7 <= 5 is false, and 3 == 3 is true. The ! operator negates 2 > 1 to false. Since && has higher precedence than ||, the expression 3 == 3 && !(2 > 1) evaluates to true && false, resulting in false. The entire expression then evaluates to false || false, resulting in false.
Correct Answer: &&
Explanation: The && operator is used to combine multiple conditions where both must be true in C.
Correct Answer: true
Explanation: The expression 8 >= 8 is true, and 4 != 4 is false. Since && is logical AND, the expression 8 >= 8 && 4 != 4 evaluates to true && false, resulting in false. The ! operator negates it, resulting in true.
Correct Answer: 6 == 6 && 7 != 7
Explanation: The expression 6 == 6 is true, and 7 != 7 is false. Since && is logical AND, the entire expression evaluates to true && false, resulting in false.
Correct Answer: false
Explanation: The expression 5 < 2 is false, and 3 > 1 is true. Since && is logical AND, the entire expression evaluates to false.
Correct Answer: ||
Explanation: The || operator is used to combine multiple conditions where at least one must be true in C.
Correct Answer: false
Explanation: The expression 4 > 2 is true, and 1 < 3 is true. Since && is logical AND, the expression 4 > 2 && 1 < 3 evaluates to true. The ! operator negates it, resulting in false.
Correct Answer: 3 > 4 || 2 == 2
Explanation: The expression 3 > 4 is false, and 2 == 2 is true. Since || is logical OR, the entire expression evaluates to true.
Correct Answer: false
Explanation: The expression 6 != 6 is false, and 5 > 1 is true. Since || is logical OR, the expression 6 != 6 || 5 > 1 evaluates to false || true, resulting in true. The ! operator negates it, resulting in false.