Skip to main content

Modern Programming Languages MCQs with Answers

Practice important Modern Programming Languages MCQs with answers and explanations.

Chapter: 44
Q861:
Which statement skips the remainder of the current iteration in C?
A. break
B. exit
C. continue
D. cycle
Correct Answer: C
Chapter: 44
Q862:
What is a disadvantage of Modula-2’s use of "END"?
A. Poor readability
B. High flexibility
C. Increased reliability
D. Low flexibility
Correct Answer: A
Chapter: 44
Q863:
In FORTRAN 90, what does the CYCLE statement do?
A. Exits the loop
B. Skips to the next iteration
C. Re-initializes the loop variable
D. Terminates all nested loops
Correct Answer: B
Chapter: 44
Q864:
What type of control statement does Ada use for conditional exits?
A. break
B. exit
C. continue
D. terminate
Correct Answer: B
Chapter: 45
Q865:
What is the purpose of default parameter values in parameter passing?
A. To ensure parameters are always passed
B. To assign a default value to missing parameters
C. To optimize function execution
D. To reduce the number of parameters in a function
Correct Answer: B
Chapter: 45
Q866:
Which of the following is true about pass-by-value parameter passing in modern programming languages?
A. It copies the value to the stack
B. It uses an access path to transfer data
C. It creates a reference to the original value
D. It moves a value physically to the caller
Correct Answer: A
Chapter: 45
Q867:
Which parameter passing method can cause collision between formals and globals?
A. Pass-by-value
B. Pass-by-result
C. Pass-by-reference
D. Keyword parameter passing
Correct Answer: C
Chapter: 45
Q868:
What is the main concern when using pass-by-reference parameter passing?
A. It reduces the number of parameters
B. It can lead to access conflicts
C. It reduces function execution time
D. It ensures security of parameter data
Correct Answer: B
Chapter: 45
Q869:
In modern programming languages, what type of checking is essential for reliable parameter passing?
A. Type checking
B. Length checking
C. Syntax checking
D. Security checking
Correct Answer: A
Chapter: 45
Q870:
Which programming languages require type checking for parameter passing?
A. FORTRAN 77, original C
B. Pascal, Modula-2, Java
C. JavaScript, Python
D. Assembly, C++
Correct Answer: B
Chapter: 45
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
Correct Answer: B
Chapter: 45
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
Correct Answer: C
Chapter: 45
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
Correct Answer: A
Chapter: 45
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
Correct Answer: A
Chapter: 45
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
Correct Answer: B
Chapter: 45
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
Correct Answer: C
Chapter: 45
Q877:
What is one of the main considerations when designing parameter passing?
A. Efficiency
B. Readability
C. Number of parameters
D. Program speed
Correct Answer: A
Chapter: 45
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
Correct Answer: A
Chapter: 45
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
Correct Answer: B
Chapter: 45
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
Correct Answer: A

Test Your Knowledge

Take a timed quiz on Modern Programming Languages

🚀 Start Quiz Now