Subprogram means nothing but a function or procedure in a programming language.
An overloaded subprogram is a subprogram that has the same name as another subprogram in the same referencing environment.
A subprogram must be different from the others in the number, order, or types of its parameters, and possibly in its return type if it is a function.
The meaning of a call to an overloaded subprogram is determined by the actual parameter list (and/or possibly the type of the returned value, in the case of a function).
Overloaded subprograms have same name but not necessry have same process.
For example overloaded subprogram in C++:
using namespace std;
void show (int a)
cout << a ;
void show (int a, int b)
cout << a << b;
int a = 10;
int b = 20;
- Sebesta,”Concept of programming Language”, Pearson Edu
- Louden, “Programming Languages: Principles & Practices” , Cengage Learning
- Tucker, “Programming Languages: Principles and paradigms “, Tata McGraw –Hill.
- E Horowitz, “Programming Languages”, 2nd Edition, Addison Wesley