PASSING 2D ARRAY TO FUNCTION
BASIC PROGRAMMING
#include<stdoi.h>
#include<coinio.h>
void sum(int x, int y)
{
int z = x+y;
printf(“%d + %d =%dn”,x,y,z);
}
void multi(int x, int y)
{
int z= x*y;
printf(“%d * %d =%dn”,x,y,x);
}
void main()
{
void (*fptr)(int,int);
fptr = sum;
clrscr();
fptr(2,4);
(*fptr)(4,5);
fptr = multi;
fptr(2,4);
(*fptr)(4,5);
}
YOUR OUTPUT IS:-
2+4=6
4+5=9
2*4=8