Skip to main content

Modern Programming Languages MCQs with Answers

Practice important Modern Programming Languages MCQs with answers and explanations.

Multiple Choice Questions

Q831: Fill in the blank: Dynamic subscripts are used in arrays but disallow ______ in records.
  • A: type checking
  • B: dynamic access
  • C: pointer arithmetic
  • D: composite data
View Answer
A

Q832: Which design issue is common for both pointers and unions?
  • A: Memory allocation
  • B: Type checking
  • C: Reference ambiguity
  • D: Operator precedence
View Answer
B

Q833: How many operands does a unary operator have?
  • A: One
  • B: Two
  • C: Three
  • D: Four
View Answer
A

Q834: Which operator in C++ is used for pointers?
  • A: &
  • B: *
  • C: +
  • D: !
View Answer
B

Q835: What is operator overloading?
  • A: Using operators for type conversion
  • B: Using an operator for multiple purposes
  • C: Using operators for narrowing
  • D: Using operators for Boolean logic
View Answer
B

Q836: What is an example of implicit type conversion?
  • A: int to float
  • B: (int)angle
  • C: Float(sum)
  • D: div
View Answer
A

Q837: What is the issue with coercion in expressions?
  • A: It increases compiler optimization
  • B: It increases type error detection
  • C: It decreases type error detection
  • D: It improves runtime performance
View Answer
C

Q838: What does short-circuit evaluation in Boolean expressions do?
  • A: Prevents side effects in expressions
  • B: Always evaluates all operands
  • C: Skips evaluation when result is determined
  • D: Requires explicit coercion
View Answer
C

Q839: Which of the following is an example of a run-time error?
  • A: Syntax error
  • B: Division by zero
  • C: Incorrect casting
  • D: Overflow is a compile-time error
View Answer
B

Q840: What is the precedence order in arithmetic expressions?
  • A: +, -, *, /
  • B: parentheses, unary operators, **, *, /, +, -
  • C: *, /, +, -
  • D: Parentheses, +, -, **, /, *
View Answer
B

Test Your Knowledge

Take a timed quiz on Modern Programming Languages

🚀 Start Quiz Now