Compiler Design MCQ Questions And Answers - Run-Time Environment

This section focuses on "Run-Time Environment" in Compiler Design. These Multiple Choice Questions (MCQs) should be practiced to improve the Compiler Design skills required for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive examinations.

1. Which of the following known as the text part of a program that does not change at runtime. Its memory requirements are known at the compile time?

A. Code
B. Procedures 
C. Variables 
D. All of the above

View Answer


2. A procedure has a start and an end delimiter and everything inside it is called the body of the procedure.

A. TRUE
B. FALSE
C. A procedure has a start with delimiter but not end with delimiter.
D. A procedure has a not start with delimiter but end with delimiter.

View Answer


3. In activation record, Which of the following Stores the address of activation record of the caller procedure?

A. Access Link
B. Actual Parameters
C. Control Link
D. Temporaries

View Answer


4. Whenever a procedure is executed, its activation record is stored on the stack, also known as?

A. Access Stack
B. Control stack
C. Formal Stack
D. Return Stack

View Answer


5. _________ are known at the runtime only, unless they are global or constant.

A. values
B. Object
C. Variables
D. All of the above

View Answer


6. The location of memory (address) where an expression is stored is known?

A. r-value
B. k-value
C. l-value
D. t-value

View Answer


7. What is true about Formal Parameters?

A. These variables are declared in the definition of the called function.
B. These variables are specified in the function call as arguments.
C. Variables whose values or addresses are being passed to the called procedure are called Formal Parameter.
D. All of the above

View Answer


8. In which mechanism, the calling procedure passes the r-value of actual parameters and the compiler puts that into the called procedure’s activation record?

A. Pass by Reference
B. Pass by Name
C. Pass by Copy-restore
D. Pass by Value

View Answer


9. In which mechanism, the name of the procedure being called is replaced by its actual body?

A. Pass by Reference
B. Pass by Name
C. Pass by Copy-restore
D. Pass by Object

View Answer


10. What will be error?

7 = x + y;

A. l-value error
B. r-value error
C. Infinite loop
D. Both A and B

View Answer





Discussion



* You must be logged in to add comment.