Here is the simple Program to understad Code reusability in C programming.

#include <stdio.h>
int Addition(int x, int y ) /* function declaration and ddefinition */
 {
   return x + y;
 }
int main()
 {
  int x,y;
  printf("\n Enter any two Numbers\n");
  scanf("%d%d",&x,&y);
  int result = Addition(x, y); /* calling Function */
  printf("\nThe result %d+%d=%d", x,y,result);
  printf("\n Enter any two Numbers\n");
   scanf("%d%d",&x,&y);
  int result = Addition(x,y); /* recall/reuse of function */
   printf("\nThe result %d+%d=%d", x,y,result);
   return 0;
 }


Previous Topic:-->> Introduction to Function in C || Next topic:-->>Multiple Function Program.
Other Topics: