Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

linked list lloop

  • Loading branch information...
commit 74b02a99d875f5c6a319d549fa43bf28a6751d55 1 parent 44d90ff
@capotej authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 ourlib/node.c
View
8 ourlib/node.c
@@ -22,13 +22,13 @@ struct Node *node_push(struct Node *list, char *val){
return n;
}
-void free_node(struct Node *list){
+void print_node(struct Node *list){
struct Node *n;
- printf("%s", list->data);
+ printf("%s\n", list->data);
n = list;
while(n->next != NULL){
n = n->next;
- printf("%s", n->data);
+ printf("%s\n", n->data);
}
}
@@ -46,7 +46,7 @@ int main(){
// printf("%s\n", node->next->next->data);
- free_node(node);
+ print_node(node);
return 0;
Please sign in to comment.
Something went wrong with that request. Please try again.