Subroutines and functions Flashcards
1
Q
What is a function?
A
A named section of code that performs a specific task.
2
Q
What’s the difference between a function and a procedure?
A
Procedures doesn’t return a value.
3
Q
What is a subroutine?
A
A subroutine is a sequence of instructions that perform a specific task within a program. A subroutine can be extracted and used in other programs where appropriate.