Skip to main content

Modern Programming Languages MCQs with Answers

Practice important Modern Programming Languages MCQs with answers and explanations.

Chapter: 14
Q241:
What does Ada's type 'LetterGrades' represent?
A. A sequence of ordered grades
B. A set of modular arithmetic types
C. A range of integer values
D. A floating-point type for grades
Correct Answer: A
Chapter: 14
Q242:
What is the valid range of values for the Ada type 'Sin_Values' defined as type Sin_Values is digits 10 range -1.0..1.0;?
A. -1.0 to 1.0
B. 0 to 100
C. -100 to 100
D. 0.0 to 1.0
Correct Answer: A
Chapter: 14
Q243:
Which Ada feature helps in defining reusable components?
A. Packages and generic types
B. Modular types
C. Floating-point types
D. Fixed-point types
Correct Answer: A
Chapter: 14
Q244:
What does the operator 'Abs' in Ada return?
A. The absolute value
B. The sum of values
C. The difference between values
D. The square of the value
Correct Answer: A
Chapter: 14
Q245:
In Ada, which type can represent a collection of colors like Red, Orange, and Blue?
A. Enumeration Type
B. Integer Type
C. Real Type
D. Fixed Point Type
Correct Answer: A
Chapter: 14
Q246:
In Ada, the operator '/=' represents which operation?
A. Inequality
B. Equality
C. Assignment
D. Exponentiation
Correct Answer: A
Chapter: 14
Q247:
Which Ada operator is used for string concatenation?
A. &
B. +
C. *
D. /
Correct Answer: A
Chapter: 14
Q248:
Which of the following is true about Ada’s exception handling?
A. It automatically catches errors like overflow and invalid array indexes.
B. It only handles compile-time errors.
C. It does not support any form of error handling.
D. It only handles logical errors.
Correct Answer: A
Chapter: 14
Q249:
In Ada, what type is used to represent signed integers?
A. Integer Types
B. Modular Types
C. Floating-Point Types
D. Enumeration Types
Correct Answer: A
Chapter: 14
Q250:
Ada provides ________ for controlling data representation in systems programming.
A. Data types
B. Error handling
C. Exception handling
D. Tasks
Correct Answer: A
Chapter: 14
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;
Correct Answer: A
Chapter: 14
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
Correct Answer: A
Chapter: 14
Q253:
Which of the following Ada types is used to handle characters in Unicode?
A. Wide_Character
B. Simple_Character
C. Modular
D. Integer
Correct Answer: A
Chapter: 14
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
Correct Answer: A
Chapter: 14
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
Correct Answer: A
Chapter: 14
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
Correct Answer: A
Chapter: 14
Q257:
In Ada, the operator '**' represents ________.
A. Exponentiation
B. Multiplication
C. Division
D. Modulus
Correct Answer: A
Chapter: 14
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
Correct Answer: A
Chapter: 14
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
Correct Answer: A
Chapter: 14
Q260:
Ada allows a limited overloading of which operator?
A. Assignment ( := )
B. Exponentiation ( ** )
C. Addition ( + )
D. Multiplication ( * )
Correct Answer: A

Test Your Knowledge

Take a timed quiz on Modern Programming Languages

🚀 Start Quiz Now