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