Modern Programming Languages MCQs with Answers
Practice important Modern Programming Languages MCQs with answers and explanations.
Chapter: 12
Q181:
In SNOBOL, the "GOTO" control structure allows for _______ control flow.
A. Conditional jumps
B. Unconditional jumps
C. Nested loops
D. For-each loops
Correct Answer:
B
Chapter: 12
Q182:
What is one of the design issues that SNOBOL faced due to its developers' limited experience?
A. Excessive documentation
B. Poor readability and writability
C. Strong operator overloading
D. Advanced string operations
Correct Answer:
B
Chapter: 12
Q183:
What does SNOBOL's overloaded blank space operator cause?
A. Simplified coding
B. Reduced syntax errors
C. Confusion in coding and maintenance
D. Faster program execution
Correct Answer:
C
Chapter: 12
Q184:
The SNOBOL compiler would accept any _______ as a valid program.
A. Variable
B. String
C. Operator
D. Function
Correct Answer:
B
Chapter: 12
Q185:
The SNOBOL compiler's lack of sophistication meant it would accept _______.
A. Only SNOBOL programs
B. Any valid string
C. Only mathematical expressions
D. Syntax errors
Correct Answer:
B
Chapter: 12
Q186:
Which function in SNOBOL is used to create a table with N elements initially?
A. TABLE()
B. TABLE(N)
C. ARRAY()
D. ARRAY(N)
Correct Answer:
B
Chapter: 12
Q187:
SNOBOL’s dynamic typing feature allows for the mixing of _______ and _______ operations.
A. Arithmetic, boolean
B. String, boolean
C. Arithmetic, string
D. String, variable
Correct Answer:
C
Chapter: 12
Q188:
The "REPLACE" function in SNOBOL is used for _______.
A. Concatenating strings
B. Replacing characters in a string
C. Creating new variables
D. Replacing entire strings
Correct Answer:
B
Chapter: 12
Q189:
The "SIZE" function in SNOBOL returns the _______ of a string.
A. Length
B. Content
C. First character
D. Last character
Correct Answer:
A
Chapter: 12
Q190:
Which of the following was a major problem with the development of SNOBOL?
A. No variable length strings
B. Poor operator overloading
C. Lack of documentation
D. Advanced features
Correct Answer:
C
Chapter: 12
Q191:
What does the "SIZE(TEXT)" function return when the string stored in TEXT is 'NUT'?
A. 2
B. 3
C. 4
D. 1
Correct Answer:
B
Chapter: 12
Q192:
Fill in the blank: SNOBOL supports _______ which allows arrays to hold elements of different data types.
A. Static typing
B. Dynamic typing
C. Integer type
D. Fixed data types
Correct Answer:
B
Chapter: 12
Q193:
In SNOBOL, the "$" operator is used for _______.
A. Concatenation
B. Indirect reference
C. Arithmetic operations
D. Defining functions
Correct Answer:
B
Chapter: 12
Q194:
The primary issue with the use of the blank space operator in SNOBOL was that it caused _______ in coding and maintenance.
A. Easier coding
B. Confusion
C. Faster program execution
D. Simple syntax
Correct Answer:
B
Chapter: 12
Q195:
In SNOBOL, which function is used to replace one substring with another within a string?
A. REPLACE
B. SIZE
C. CONCAT
D. SEARCH
Correct Answer:
A
Chapter: 12
Q196:
The "T<'A'> = 1" statement in SNOBOL associates which value with the key 'A'?
A. 1
B. 'A'
C. 'T'
Correct Answer:
A
Chapter: 12
Q197:
In SNOBOL, which feature enables users to easily extend programs at runtime?
A. Dynamic typing
B. Run-time compilation
C. Lack of string operations
D. Limited features
Correct Answer:
B
Chapter: 13
Q198:
What is the primary design goal of the Ada programming language?
A. Program readability
B. Program speed
C. Program complexity
D. Program flexibility
Correct Answer:
A
Chapter: 13
Q199:
Which feature of Ada supports the creation of reusable components?
A. Packages
B. Functions
C. Classes
D. Objects
Correct Answer:
A
Chapter: 13
Q200:
What mechanism does Ada use to handle errors at runtime?
A. Exception handling
B. GOTO control structure
C. Overloaded operators
D. Debugging tools
Correct Answer:
A