Skip to main content

Modern Programming Languages MCQs with Answers

Practice important Modern Programming Languages MCQs with answers and explanations.

Multiple Choice Questions

Q231: In Ada, which type is used for modular arithmetic with wraparound properties?
  • A: Integer
  • B: Real
  • C: Modular
  • D: Floating-Point
View Answer
C

Q232: What does the 'Pred' function do in Ada for enumeration types?
  • A: It calculates the previous value in the enumeration.
  • B: It performs arithmetic operations.
  • C: It defines a fixed-point type.
  • D: It initializes an array.
View Answer
A

Q233: Ada supports which of the following floating-point types with specified precision?
  • A: Fixed Point Types
  • B: Floating Point Types
  • C: Integer Types
  • D: Boolean Types
View Answer
B

Q234: Which of the following types in Ada defines a floating-point number with 15 decimal digits of precision?
  • A: type Double is digits 15;
  • B: type Float is range -1.0..1.0;
  • C: type Real is range 0.0..100.0;
  • D: type Fixed is digits 10;
View Answer
A

Q235: What does the 'delta' keyword represent in Ada's fixed-point types?
  • A: The spacing between values in the range
  • B: The maximum value of the type
  • C: The number of decimal digits of precision
  • D: The sign of the values
View Answer
A

Q236: Which type in Ada is used for financial applications with decimal precision?
  • A: Ordinary Fixed Point Types
  • B: Decimal Fixed Point Types
  • C: Integer Types
  • D: Modular Types
View Answer
B

Q237: In Ada, which operator is used for equality comparison?
  • A: =
  • B: ==
  • C: :=
  • D: /=
View Answer
A

Q238: Ada allows you to define your own types, creating a new type by defining a ________.
  • A: Range
  • B: Data structure
  • C: Variable
  • D: Data type
View Answer
D

Q239: The Ada compiler resolves ambiguity between symbolic literals in enumeration types based on ________.
  • A: The type of the variable
  • B: The order of declaration
  • C: The range of values
  • D: The size of the variable
View Answer
A

Q240: Which of the following types is used for true/false conditions in Ada?
  • A: Boolean
  • B: Integer
  • C: Modular
  • D: Floating-Point
View Answer
A

Test Your Knowledge

Take a timed quiz on Modern Programming Languages

🚀 Start Quiz Now