#include<stdio.h> void display(int n) { int i; for(i=1;i<=n;i++) printf("%d ",i); } int max(int a,int b) { if(a>b) return a; else return b; } void main() { int z; void (*p1)(int); int (*p2)(int,int); int (*p3)(int,int); p1=&display; p2=&max; p3=&min; //display(15); (*p1)(15); //z=max(4117,3012); z=(*p2)(4117,3012); printf("\nGreatest no is %d",z); //z=min(4117,3012); z=(*p3)(4117,3012); printf("\nLowest no is %d",z); }
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Greatest no is 4117 Lowest no is 3012