fork(4) download
  1. #include <stdio.h>
  2.  
  3. int increase(int x) {
  4. return x + 1;
  5. }
  6.  
  7. typedef int (*increase_fp)(int);
  8.  
  9. increase_fp get_increase() {
  10. return increase;
  11. }
  12.  
  13. int main(void) {
  14. printf("%d", get_increase()(1));
  15. return 0;
  16. }
Success #stdin #stdout 0.01s 1720KB
stdin
Standard input is empty
stdout
2