Modern Programming Languages MCQs with Answers
Practice important Modern Programming Languages MCQs with answers and explanations.
Multiple Choice Questions
Q251: What is the Ada type used to define an unsigned integer with values 0 to 6?
- A: type M is mod 7;
- B: type Integer is range 0..6;
- C: type Modular is mod 7;
- D: type Unsigned is range 0..6;
View Answer
A
Q252: The keyword 'type' in Ada is used for ________.
- A: Defining new data types
- B: Creating variables
- C: Assigning values to variables
- D: Initializing constants
View Answer
A
Q253: Which of the following Ada types is used to handle characters in Unicode?
- A: Wide_Character
- B: Simple_Character
- C: Modular
- D: Integer
View Answer
A
Q254: Ada’s 'State' type includes which of the following values?
- A: Off, Powering_Up, On
- B: Red, Green, Blue
- C: 0, 1, 2
- D: Yes, No
View Answer
A
Q255: The Ada keyword 'mod' in type M is mod 7; represents ________.
- A: A modular arithmetic system
- B: A module for handling exceptions
- C: A method for defining floating-point numbers
- D: A fixed-point type
View Answer
A
Q256: What is the primary goal of Ada's design regarding error handling?
- A: To catch as many errors as possible at compile-time and runtime
- B: To reduce code verbosity
- C: To allow easier debugging
- D: To enable flexible error handling only at runtime
View Answer
A
Q257: In Ada, the operator '**' represents ________.
- A: Exponentiation
- B: Multiplication
- C: Division
- D: Modulus
View Answer
A
Q258: In Ada, which type supports a fixed range of values such as 0..100 for scores?
- A: Discrete Types
- B: Floating Point Types
- C: Character Types
- D: Fixed Point Types
View Answer
A
Q259: In Ada, which of the following types supports range-based values like 0..6?
- A: Modular Types
- B: Integer Types
- C: Boolean Types
- D: Floating-Point Types
View Answer
A
Q260: Ada allows a limited overloading of which operator?
- A: Assignment ( := )
- B: Exponentiation ( ** )
- C: Addition ( + )
- D: Multiplication ( * )
View Answer
A