Skip to content
Snippets Groups Projects
Commit 8b423aa3 authored by Felipe Boeira's avatar Felipe Boeira
Browse files

Fixed skeleton

parent c5802b68
Branches
No related tags found
No related merge requests found
#ifndef __LIB_KERNEL_LIST_H
#define __LIB_KERNEL_LIST_H
#include <stdlib.h>
#include <stdio.h>
/* Doubly linked list.
......
#include "list.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct student {
char *name;
struct list_elem elem;
};
void insert (struct list *student_list) {
}
void delete (struct list *student_list) {
}
void list (struct list *student_list) {
}
void quit (struct list *student_list) {
}
int main() {
struct list student_list;
list_init (&student_list);
int opt;
do {
printf("Menu:\n");
printf("1 - Insert student\n");
printf("2 - Delete student\n");
printf("3 - List students\n");
printf("4 - Exit\n");
scanf("%d", &opt);
switch (opt) {
case 1:
{
insert(&student_list);
break;
}
case 2:
{
delete(&student_list);
break;
}
case 3:
{
list(&student_list);
break;
}
case 4:
{
quit(&student_list);
break;
}
default:
{
printf("Quit? (1/0):\n");
scanf("%d", &opt);
if (opt)
quit(&student_list);
break;
}
}
} while(1);
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment