Subprograms are the fundamental building blocks of programs.

The two fundamental kinds of subprograms are,

  1. Functions
  2. Procedures

1. Functions: Functions return values , such that,

int show(int a)
return a;

2. Procedures: Procedures do not return values, such that

void show(int a)

Video lecture on Subprogram in Hindi