One simple example from me.
Code:
#include<stdio.h>
#define N 4 // define size of the array below which equals 4
#define T 0 // define Termination which equals 0
int main()
{
int x[N]={1,2,3,4};
int i=0;
for(; i<N; i++)
printf("The elements of array are : %d ", x[i]);
return T;
}
with the preprocessor command #define you will substitute the N and T with the values 4 and 0 respectively.
The purpose that someone do this is to reuse the N & T in many points into the code.
This example supports and contains only the basic "function" of the preprocessor command #define .
Mr. Lnx