fork download
  1. #include <stdio.h>
  2.  
  3. typedef int (*p)(char *s);
  4.  
  5. int print(char *str){
  6. printf("%s\n",str);
  7. }
  8.  
  9. int main(void) {
  10. // your code goes here
  11. char *name = "Papa";
  12. p func = &print;
  13. func(name);
  14.  
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0s 9432KB
stdin
Standard input is empty
stdout
Papa