fork download
  1. #include <stdio.h>
  2. typedef struct NODE
  3. {
  4. char data;
  5. struct NODE *next;
  6. } Node;
  7.  
  8. void foo (Node *head){}
  9.  
  10. void bar (void *head)
  11. {
  12. foo ((struct Node* ) head);
  13. }
  14.  
  15. int main(){
  16. k;
  17. return 0;
  18. }
Compilation error #stdin compilation error #stdout 0s 2288KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘bar’:
prog.c:12:16: warning: passing argument 1 of ‘foo’ from incompatible pointer type [enabled by default]
   foo ((struct Node* ) head); 
                ^
prog.c:8:6: note: expected ‘struct Node *’ but argument is of type ‘struct Node *’
 void foo (Node *head){}
      ^
prog.c: In function ‘main’:
prog.c:16:1: error: ‘k’ undeclared (first use in this function)
 k;
 ^
prog.c:16:1: note: each undeclared identifier is reported only once for each function it appears in
stdout
Standard output is empty