Q29.Marks: +2.0UGC NET Paper 2: Computer Science 7th Dec 2023 Shift 2
A program that is used by other routines to accomplish a particular task, is called :
1.Micro program
2.Micro operation
3.Routine
4.Subroutine ✓ Correct
Solution
The correct answer is Subroutine
Key Points
Subroutine:
A subroutine, also known as a function, method, procedure, or routine, is a set of instructions designed to perform a frequently used operation within a program. They can accept arguments, perform specific operations, and often return a result.
When another routine or program needs to perform that operation, the subroutine can be called, or invoked. This aids code reusability, as the same subroutine can be used multiple times within a program or across different programs.
Additional Information
Microprogram:
This is a layer of hardware-level instructions or data structures involved in implementing higher-level machine code instructions in certain computers, especially those using CISC architecture. It may be regarded as a step-by-step process for the machine to follow, carrying out complex instructions as a sequence of simpler, micro-level operations.
Microoperation:
Also known as a micro-action, this concept refers to the most basic tasks a computer's control unit can perform, such as fetching an instruction from memory or performing arithmetic operations. These are atomic, lower-level operations necessary to execute higher-level, more complex instructions.
Routine:
This term typically refers to a sequence of programming instructions that perform a specific task, packaged as a unit—like a section of code. This piece of code can be written once and called by multiple main programs, thus promoting reusability and modularity. Often used in higher level programming languages. It's similar to a subroutine but often refers to larger operations.