COMPUTER FUNDAMENTALS

COMPUTER SOFTWARE

PROGRAMMING LANGUAGES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Program subroutines are?
A
fixed variable
B
default variables
C
called by other programs
D
None of the above
Explanation: 

Detailed explanation-1: -A subroutine is a named section of code that can be called by writing the subroutine’s name in a program statement. Subroutines can also be referred to as procedures or functions.

Detailed explanation-2: -One program can call another program as a subroutine. The subroutine can be external (a separate program) or internal (included in the main program). Subroutines are useful when a program needs to repeat the same group of commands at several different places.

Detailed explanation-3: -To call a subroutine, use the CALL instruction followed by the subroutine name (label or program member name). You can optionally follow this with up to 20 arguments separated by commas. The subroutine call is an entire instruction.

Detailed explanation-4: -Subroutines make programs shorter as well as easier to read and understand, because they break program code into smaller sections. You can test procedures or functions separately, rather than having to test the whole program. This makes programs easier to debug.

There is 1 question to complete.