Advertisement
Guest User

Untitled

a guest
Sep 18th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. struct entry {
  4. int value;
  5. struct entry *next;
  6. };
  7.  
  8. static void out(struct entry *e) {
  9. if (e->next != NULL) out(e->next);
  10. printf("%d\n", e->value);
  11. }
  12.  
  13. int main(void) {
  14. struct entry a = {1, NULL}, b = {2, &a}, c = {3, &b}, *head = &c;
  15. out(head);
  16. return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement