fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. typedef struct node{
  5. int val;
  6. struct node *next;
  7. }Node;
  8.  
  9. Node *head=NULL;
  10.  
  11. void insHead(int x){
  12. Node *p;
  13. p=(Node *)malloc(sizeof(Node));
  14. printf("%d",p);
  15. p->next=head;
  16. p->val=x;
  17. head=p;
  18. }
  19.  
  20. int main(void) {
  21. // your code goes here
  22. insHead(1);
  23. return 0;
  24. }
  25.  
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
-996691360