Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
L
linked_list2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Liam E. Roeth
linked_list2
Commits
b6e8ee2d
Commit
b6e8ee2d
authored
Sep 17, 2020
by
Liam E. Roeth
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.cs.hofstra.edu/h702747900/linked_list2
parents
1baf6dd5
f815a89f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
0 deletions
+52
-0
main.c
main.c
+52
-0
No files found.
main.c
View file @
b6e8ee2d
#include<stdio.h>
#include<stdlib.h>
#include "llist.h"
void
menu
(
struct
Node
*
head
){
int
choice
;
printf
(
"Welcome to the menu for creation of linked lists.
\n
"
);
printf
(
"Displaying possible actions:
\n
"
);
printf
(
"1. Add at End;
\n
2. Delete Node;
\n
3. Insert Node;
\n
4. Search for value;
\n
5. Print a node;
\n
6. Print full list;
\n
7. Delete list;
\n
8. Exit;
\n
"
);
printf
(
"Please input the number of your desired action: "
);
scanf
(
"%d"
,
&
choice
);
switch
(
choice
)
{
case
1
:
//add at end
break
;
case
2
:
//delete node
break
;
case
3
:
//insert node
break
;
case
4
:
int
val
;
printf
(
"You have selected to search for a value. Please input the value now: "
);
scanf
(
"%d"
,
&
val
);
search
(
val
,
*
head
);
break
;
case
5
:
int
node
;
printf
(
"You have selected to print a node. Please input the node index now: "
);
scanf
(
"%d"
,
&
node
);
print_node
(
node
,
*
head
);
break
;
case
6
:
printf
(
"Printing full list.
\n
"
);
print_list
(
*
head
);
break
;
case
7
:
//Delete list
break
;
}
}
int
main
(){
struct
Node
*
start
=
NULL
;
int
arr
[]
=
{
10
,
20
,
30
,
40
,
50
};
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment