Q17.Marks: +2.0UGC NET Paper 2: Computer Science 18th June 2024 Shift 1 (Cancelled)
Arrange the following in correct order, so that they can follow a proper run time environment :
A. Programming statement
B. Compilation
C. Memory allocation
D. Type of variable
E. Memory deallocation
Choose the correct answer from the options given below :
1.A, B, C, D, E
2.A, B, D, C, E✓ Correct
3.B, A, D, C, E
4.C, D, B, E, A
Solution
The correct answer is A, B, D, C, E
Key Points
To arrange the steps of a proper runtime environment in the correct order, let's understand the logical sequence:
Programming statement (A): Writing the code that includes the instructions and logic for the application.
Compilation (B): Compiling the written code into an executable form, while also checking for syntax and semantic errors.
Type of variable (D): During or before compilation, the types of variables are determined (declaring the variable types which is usually part of programming and compilation).
Memory allocation (C): At runtime, memory is allocated for the variables and data structures.
Memory deallocation (E): After the program completes execution, memory is deallocated to free up resources.