[amp_mcq option1=”to assign storage to all variables referenced in the source program.” option2=”to assign storage to all temporary locations that are necessary for intermediate results.” option3=”to assign storage to literals, and to ensure that the storage is allocate and appropriate locations are initialized.” option4=”all of the above E. None of the above” correct=”option4″]
The correct answer is D. all of the above.
Storage assignment is the process of allocating storage for variables and constants in a program. It is performed by the compiler during the compilation process. The compiler must assign storage for all variables that are referenced in the program, as well as for all temporary locations that are necessary for intermediate results. The compiler must also ensure that the storage is allocated in a way that is efficient and does not conflict with other variables or constants in the program.
Option A is correct because the compiler must assign storage to all variables referenced in the program. Option B is correct because the compiler must also assign storage to all temporary locations that are necessary for intermediate results. Option C is correct because the compiler must also assign storage to literals, and to ensure that the storage is allocate and appropriate locations are initialized.
Option E is incorrect because the compiler must perform storage assignment for all variables, constants, and temporary locations in the program.