A program to explain FUNCTION PROTOTYPE
C Programming Language 074
- Write a program to explain FUNCTION PROTOTYPE
Program
#include <stdio.h>
int area(int, int);
void main()
{
int l, b, ar;
printf("Enter l, b: ");
scanf("%d %d", &l, &b);
ar = area(l, b);
printf("Area = %d", ar);
printf("\n");
}
int area(int p, int q)
{
int a;
a = p * q;
return a;
}
Result
Enter l, b: 2 3
Area = 6
Last Updated on
Comments