Modern Programming Languages MCQs with Answers
Practice important Modern Programming Languages MCQs with answers and explanations.
Multiple Choice Questions
Q141: In SNOBOL, which operator is used for string concatenation?
- A: +
- B: Space
- C: &
- D: Period
View Answer
B
Q142: If ROW = 'K' and NO. = 22, what will be the value of SEAT in SEAT = ROW NO.?
- A: K22
- B: K 22
- C: K.22
- D: K_22
View Answer
A
Q143: What is the result of 2 ** 3 ** 2 in SNOBOL?
- A: 64
- B: 512
- C: 128
- D: 729
View Answer
B
Q144: In SNOBOL, which of the following statements is used for altering the flow of control?
- A: Loop statement
- B: GOTO field
- C: While loop
- D: If-Else
View Answer
B
Q145: What happens if a string can be interpreted as a number in a SNOBOL expression?
- A: It’s converted to uppercase
- B: It’s converted to numeric value
- C: It’s ignored
- D: It causes an error
View Answer
B
Q146: What will the value of x be in x = 5 * -z + '10.6' if z = '10'?
- A: -39.4
- B: -50.6
- C: 15.6
- D: -45.4
View Answer
A
Q147: What does the space symbol do in SNOBOL when used in concatenation and pattern matching?
- A: Pattern matching
- B: Concatenation
- C: Both concatenation and pattern matching
- D: None of the above
View Answer
C
Q148: In SNOBOL, what does the replacement statement do?
- A: Replaces characters in a string
- B: Deletes a string
- C: Assigns values to variables
- D: It performs pattern matching only
View Answer
A
Q149: What is the result of the replacement operation: SENTENCE = 'THIS IS YOUR PEN', SENTENCE 'YOUR' = 'MY'?
- A: 'THIS IS MY PEN'
- B: 'THIS IS YOUR PEN'
- C: 'THIS IS MY YOUR PEN'
- D: 'THIS IS PEN'
View Answer
A
Q150: What is the output of the operation: TEXT = 'THIS IS AN INTEGER', TEXT KEYWORD =?
- A: 'THIS IS INTEGER'
- B: 'THIS IS CHAR'
- C: 'THIS IS AN'
- D: 'THIS IS'
View Answer
A