fork download
  1. #include <stdio.h>
  2.  
  3. int sum(int a, int b){
  4. return a + b;
  5. }
  6.  
  7. int main(){
  8. void* foo = &sum;
  9. int (*f)(int, int) = foo;
  10. printf("Esta soma e ilegal? Soma = %d\n", f(10, 8));
  11. return 0;
  12. }
Success #stdin #stdout 0s 4340KB
stdin
Standard input is empty
stdout
Esta soma e ilegal? Soma = 18