Advertisement
Guest User

Untitled

a guest
Oct 15th, 2020
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.45 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int bounce(int a);
  4. int caller ((int(*function), (int), int b);
  5.  
  6.     int main() {
  7.         int num;
  8.         int (*fptr) (int)=bounce;
  9.  
  10.         num=(*fptr) (10);
  11.         printf("Returned value: %d \n", num);
  12.  
  13.         num=caller(fptr, 5);
  14.         printf("Returned value; %d \n", num);
  15.  
  16.         return 0;
  17.     }
  18.  
  19.     int bounce(int a) {
  20.         printf("\n Received value: %d \n", a);
  21.         return ((3 * a) + 3);
  22.     }
  23.  
  24.     int caller((int(*function) (int), int b) {
  25.         (function*) (b);
  26.     }
  27.    
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement