fork download
  1.  
  2. void reverse()
  3. {
  4. struct listNode *p, *q, *r;
  5.  
  6. p = head;
  7. q = NULL;
  8.  
  9. while( p != NULL )
  10. {
  11. r = q;
  12. q = p;
  13. p = p->nextPtr;
  14. q->nextPtr = r;
  15. }
  16.  
  17. head = q;
  18. }
  19.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘reverse’:
prog.c:6:9: error: ‘head’ undeclared (first use in this function)
prog.c:6:9: note: each undeclared identifier is reported only once for each function it appears in
prog.c:7:9: error: ‘NULL’ undeclared (first use in this function)
prog.c:13:14: error: dereferencing pointer to incomplete type
prog.c:14:10: error: dereferencing pointer to incomplete type
stdout
Standard output is empty