Subroutine is nothing but a function or a module. Subroutines does a single tasks. Subroutine can be called any no of times and can be executed. Subroutine can take the input or can simply executes without input.
When calling the subroutine we need to pass the input as arguments or parameters.
As when a subroutine is called and executed, immediately the controller comes back to the main program after the subroutine call and executed seqentially.
Get Answers For Free
Most questions answered within 1 hours.