fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct node {
  5. int roll;
  6. node *next;
  7. };
  8.  
  9. node *root = NULL;
  10.  
  11. void append(int roll)
  12. {
  13. if(root==NULL) {
  14. root = new node();
  15. root->roll = roll;
  16. root->next = NULL;
  17. }
  18. else {
  19. node *cnode = root;
  20. while(cnode->next!=NULL)
  21. cnode=cnode->next;
  22. node *node;
  23. }
  24. }
  25.  
  26.  
  27.  
  28. int main()
  29. {
  30.  
  31. return 0;
  32. }
Success #stdin #stdout 0s 2736KB
stdin
Standard input is empty
stdout
Standard output is empty