-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlinkedlist1.c
45 lines (39 loc) · 1023 Bytes
/
linkedlist1.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include <stdio.h>
struct node {
int data;
struct node *next;
};
int insert(int pos);
int del(int pos);
int display();
int main() {
int ch, pos;
while(1){
printf("-----------Operations of Linked List-----------\n");
printf("1. Insert\n");
printf("2. Delete\n");
printf("3. Display\n");
printf("4. Exit\n");
printf("Enter your Choice:\n");
scanf("%d" , &ch);
switch(ch){
case 1: printf("Enter the postion you want to insert: \n");
scanf("%d" &pos);
insert(pos);
break;
case 2: printf("Enter the position you want to delete element from: \n");
scanf("%d" , &pos);
break;
case 3: display();
case 4: exit(0);
default: printf("Invalid Choice!");
}
}
return 0;
}
int insert(int pos){
}
int del(int pos){
}
int display(){
}