Skip to content

Commit

Permalink
adding 4.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrfosse committed Mar 24, 2017
1 parent 3bb61f5 commit 24854ed
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
25 changes: 25 additions & 0 deletions 0x11-singly_linked_lists/4-main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "lists.h"

/**
* main - check the code for Holberton School students.
*
* Return: Always 0.
*/
int main(void)
{
list_t *head;

head = NULL;
add_node_end(&head, "Jennie");
add_node_end(&head, "&");
add_node_end(&head, "Jay");
add_node_end(&head, "love");
add_node_end(&head, "asm");
print_list(head);
free_list(head);
head = NULL;
return (0);
}
1 change: 1 addition & 0 deletions 0x11-singly_linked_lists/lists.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ size_t print_list(const list_t *h);
size_t list_len(const list_t *h);
list_t *add_node(list_t **head, const char *str);
list_t *add_node_end(list_t **head, const char *str);
void free_list(list_t *head);

#endif

0 comments on commit 24854ed

Please sign in to comment.