C Programming - Functions - Discussion
Discussion Forum : Functions - Find Output of Program (Q.No. 10)
10.
What will be the output of the program?
#include<stdio.h>
int fun(int, int);
typedef int (*pf) (int, int);
int proc(pf, int, int);
int main()
{
printf("%d\n", proc(fun, 6, 6));
return 0;
}
int fun(int a, int b)
{
return (a==b);
}
int proc(pf p, int a, int b)
{
return ((*p)(a, b));
}
Discussion:
49 comments Page 4 of 5.
Hema said:
8 years ago
@Vishwas.
Thanks for your explanation.
Thanks for your explanation.
Thenu said:
9 years ago
@Vishwas.
Thanks, Clearly understood.
Thanks, Clearly understood.
Gopichand said:
1 decade ago
Please any one can explain me clearly.
Prasadreddy said:
1 decade ago
What is pf p. Let any one explain me?
Susanta said:
1 decade ago
What is the type of pf ? please help.
Ashish Patil said:
9 years ago
Thanks to all of your explanation.
Saroj said:
8 years ago
Please, anyone explain me clearly.
Diana said:
1 decade ago
Excellent answer!!Vishwas
Ashwini Gour said:
9 years ago
Thanks, @Manukundloo.
Azagumozhi said:
9 years ago
Nice answer @Vishwas.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers