fork download
  1. #include <stdio.h>
  2.  
  3. void function(int x, int y){
  4. printf("%d,%d\n",x,y);
  5. }
  6.  
  7. int main(){
  8. int (*fptr)(int,int);
  9. fptr = function;
  10. int a = fptr(2,3);
  11. printf("%d\n",a);
  12. return 0;
  13. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:9:10: error: assignment from incompatible pointer type [-Werror]
     fptr = function;
          ^
cc1: all warnings being treated as errors
stdout
Standard output is empty