Identify the correct logical sequence for programming:
UGC-NET · Teaching & Research Aptitude2 January 2026 (Shift 2)Question 36Answer from published final key
Identify the correct logical sequence for programming: A. Compilation B. Editing C. Linking D. Execution Choose the correct answer from the options given below :
A
D, B, A, C
B
A, B, D, C
C
A, B, C, D
D
B, A, C, D
✓ Correct
Answer: option D — B, A, C, D
Detailed solution
Correct Answer
D. B, A, C, D
Explanation
A program goes through a fixed chain of stages before the machine can run it. Each stage uses what the previous stage produced.
B. Editing: the programmer types the source code in an editor and saves it as a source file. Until this is done, there is nothing to process.
A. Compilation: the compiler checks the source for syntax errors. It then translates the code into machine-level object code.
C. Linking: the linker joins the object code with library routines and any other object modules the program calls. The result is a single executable file.
D. Execution: the executable is loaded into memory and run. It produces the output.
So the logical order is Editing → Compilation → Linking → Execution. That is B, A, C, D, which is option D.
The answer depends on this chain of needs. Compilation needs a saved source file. Linking needs object code. Execution needs a linked executable. If you move any stage, the chain breaks.
Key Points
Order of stages: Edit → Compile → Link → Execute.
Compiler output is object code. Linker output is an executable file.
The linker resolves references to library functions.
Each stage needs the output of the one before it.
Why the other options are incorrect
A
D, B, A, C→This starts with execution. At the start there is no executable file, so nothing can run. Editing must come first and execution must come last.
B
A, B, D, C→This has two faults. Compilation comes before the code is written. Execution comes before linking. An unlinked object file has unresolved references to library functions, so it cannot run.
C
A, B, C, D→Only the first two stages are swapped, but that is enough to make it wrong. A compiler cannot translate a source file that has not yet been written and saved.
Example
In C, you type hello.c in an editor. gcc compiles it to object code hello.o. The linker adds the standard library code for printf and produces a.out. Only then does running a.out print the message.