Guest User

Untitled

a guest
May 22nd, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. # include <stdio.h>
  2. # include <stdlib.h>
  3.  
  4. # define null 0
  5.  
  6. struct list {
  7. char* value;
  8. struct list* next;
  9. };
  10.  
  11. void print_list(struct list* _link) {
  12. int i = 0;
  13. while((int)*(_link[i].value) > 0) {
  14. printf("%s\n",_link[i].value);
  15. i++;
  16. }
  17. }
  18.  
  19. int main(void) {
  20. struct list base[100];
  21. struct list* base_pointer = base;
  22.  
  23. base[0].value = "Bbase";
  24. base[1].value = "cool";
  25.  
  26. print_list(base_pointer);
  27. }
Add Comment
Please, Sign In to add comment