1) Choose a correct statement.
int a = 12 + 3 * 5 / 4 - 10
In the above statement.
A) 12, 3, 5, 4 and 10 are Operators.
+, -, * and / are Operands.
= is an increment operator.
B) 12, 3, 5, 4 and 10 are Operands.
+, -, * and / are Operators.
= is decrement operator.
C) 12, 3, 5, 4 and 10 are Operands.
+, -, * and / are Operators.
= is an assignment operator.
D) 12, 3, 5, 4 and 10 are Operands.
+, -, * and / are Logical Operators.
= is an assignment operator.
A) Percentage OperatorB) Quotient OperatorC) ModulusD) Division
A) IntegerB) Real numberC) Depends on the numbers used in the expression.D) None of the above
A) a = 10B) a = 14.867C) a = 14D) compiler error.
A) var = 8.0B) var = 8C) var = 7D) var = 0.0
int main(){float c = 3.5 + 4.5;printf("%f", c);return 0;}
A) 8.0B) 8.000000C) 8D) 7
A) 8.0B) 8.000000C) 7D) 8
A) a = 2, b = 2, c = 2, d= 2B) a = 2, b = 2.0, c = 2, d= 2.0C) a = 2, b = 2.5, c = 2.5, d= 2.5D) a = 2.5, b = 2.5, c = 2.5, d= 2.5
A) a=2.5, b=2.5, c=2.5, d=2.5B) a=2, b=2.5, c=2.5, d=2.5C) a=2.0, b=2.5, c=2.5, d=2.5D) a=2.0, b=2.0, c=2.0, d=2.0
A) Expected algebraic real valueB) Unexpected integer valueC) Compiler error.D) None of the above
A) a = 3.5B) a = 3C) a = 0D) Compiler error
A) 3.500000B) 3C) 3.5D) 0.000000
A) 2.5B) 2C) 5D) Compiler error.
A) Only int variables = OkayB) Only float variables = OkayC) int or float combination = OkayD) Numerator int variable, Denominator any variable = Okay
A) 5 -5 -5B) 5 -5 5C) -5 -5 5D) 5 5 5
A) * > / > %B) % > * > /C) Both % = / , * are sameD) All three operators *, / and % are same.
A) 45B) 45.0C) 45.000000D) 0.000000
A) Both groups share equal priority.B) (+, -) > (*, / and %)C) (+, -) < (*, / and %)D) None of the above.
A) Operators *, / and % have Left to Right Associativity. Operators + and - have Left to Right Associativity. Operator = has Right to Left Associativitiy.B) Operators *, / and % have Right to Left Associativity. Operators + and - have Left to Right Associativity. Operator = has Right to Left Associativitiy.C) Operators *, / and % have Right to Left Associativity. Operators + and - have Right to Left Associativity. Operator = has Right to Left Associativitiy.D) Operators *, / and % have Right to Left Associativity. Operators + and - have Right to Left Associativity. Operator = has Left to Right Associativitiy.