S
Srinivas
Hi all,
Can anyone describe how the following program works:
#include<stdio.h>
int sum(int ,int);
int main()
{
int (*ptr)(int ,int);
int result;
ptr=sum;
result=test(&************&*******&********&*******&*****&sum);
printf("%d\n",result);
return 0;
}
int test(int (*ptr)(int ,int ))
{
return ptr(2,3);
}
int sum(int a,int b)
{
return a+b;
}
srinivas
Can anyone describe how the following program works:
#include<stdio.h>
int sum(int ,int);
int main()
{
int (*ptr)(int ,int);
int result;
ptr=sum;
result=test(&************&*******&********&*******&*****&sum);
printf("%d\n",result);
return 0;
}
int test(int (*ptr)(int ,int ))
{
return ptr(2,3);
}
int sum(int a,int b)
{
return a+b;
}
srinivas