Modern Programming Languages MCQs with Answers
Practice important Modern Programming Languages MCQs with answers and explanations.
Multiple Choice Questions
Q871: What is the main advantage of using pass-by-reference for large data structures?
- A: It is slower than pass-by-value
- B: It is faster and more efficient
- C: It avoids collisions between elements
- D: It improves readability
View Answer
B
Q872: What is a disadvantage of using pass-by-result in parameter passing?
- A: It may cause access path collisions
- B: It is more memory-intensive
- C: It may cause value collisions
- D: It requires more function parameters
View Answer
C
Q873: What does the term "aliasing" refer to in programming languages?
- A: Using multiple variables for the same value
- B: Optimizing variable names
- C: Changing the value of a parameter
- D: Using the same function for multiple tasks
View Answer
A
Q874: In ALGOL 60, how are parameters passed to functions?
- A: Using a reference to the stack
- B: By copying the value directly
- C: Using an access path
- D: Through the runtime environment
View Answer
A
Q875: Which parameter passing model uses physical moves of values?
- A: Pass-by-reference
- B: Pass-by-value
- C: Pass-by-result
- D: Keyword passing
View Answer
B
Q876: Which parameter passing method is considered most efficient for passing structures of significant size?
- A: Pass-by-result
- B: Pass-by-value
- C: Pass-by-reference
- D: Pass-by-pointer
View Answer
C
Q877: What is one of the main considerations when designing parameter passing?
- A: Efficiency
- B: Readability
- C: Number of parameters
- D: Program speed
View Answer
A
Q878: Which of the following is a key design consideration for parameter passing?
- A: Limiting access to variables
- B: Increasing the number of parameters
- C: Adding more functions
- D: Using global variables
View Answer
A
Q879: What is the problem with "operand evaluation order" in programming languages?
- A: It can lead to security vulnerabilities
- B: It affects the readability and causes errors
- C: It causes slower function execution
- D: It reduces the efficiency of memory use
View Answer
B
Q880: What type of parameter passing causes "collisions between formals and globals"?
- A: Pass-by-reference
- B: Pass-by-result
- C: Pass-by-value
- D: None of the above
View Answer
A