fork download
  1. #include <stdio.h>
  2.  
  3. int sqr(int x)
  4. {
  5. return x * x;
  6. }
  7.  
  8. int (*get_f())(int)
  9. {
  10. return sqr;
  11. }
  12.  
  13. int main(void)
  14. {
  15. int (*f)(int) = get_f();
  16.  
  17. int x = f(8);
  18. printf("%d", x);
  19.  
  20. return 0;
  21. }
Success #stdin #stdout 0s 4188KB
stdin
Standard input is empty
stdout
64