-
Notifications
You must be signed in to change notification settings - Fork 0
/
final_lab7.c
95 lines (75 loc) · 2.62 KB
/
final_lab7.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* Including Files */
#include "l7q1.c"
#include "l7q2.c"
#include "l7q3.c"
#include "l7q4.c"
// #include "l1q5.c"
// #include "l1q6.c"
// #include "l1q7.c"
// #include "l1q8.c"
// #include "h1q1.c"
// #include "h1q2.c"
// #include "h1q3.c"
#include "h7q3.c"
#include "h7q4.c"
//--------------------------------------------------------
/* Protoyping files*/
int l7q1();
int l7q2();
int l7q3();
int l7q4();
// int l1q5();
// int l1q6();
// int l1q7();
// int l1q8();
// int h1q1();
// int h1q2();
int h7q3();
int h7q4();
// int h1q5();
//--------------------------------------------------------
int final_lab7()
{
int choice;
printf("\n\n-------------------------Lab-7 Programs:-------------------------\n\n");
printf("0.Exit Lab-7:\n"); // -------> changes needed
printf("1.Menu driven program for stacks using array.\n");
printf("2.Menu driven program for stacks using linked list.\n");
printf("3.Program to convert infix expression to postfix expression. (BUG ALERT)\n");
printf("4.Program to convert infix expression to prefix expression. (BUG ALERT)\n");
printf("5.Sorting stack (using PUSH and POP only).\n");
printf("6.Parenthesis Matching using stacks. (BUE ALERT)\n");
// printf("7.Operations on matrix using 2D-array.\n");
// printf("8.Minimum distance between two elements in array.\n");
// printf("9.Second smallest and Senond largest element in array.\n");
// printf("10.Even followed by Odd.\n");
// printf("11.Replacing each element with next greatest element in same array.\n");
// printf("12.Replacing each element by product of its previous and next element in array.\n");
// printf("13. Sorting rows in ascending and then columns in descending order in 2D_array.\n");
do
{
printf("\n\t\tEnter Lab-7 Program number : ");
scanf("%d",&choice);
switch(choice)
{
case 0: printf("\n\n--------------------------Lab-7 Exited---------------------------\n");
break;
case 1: l7q1();
break;
case 2: l7q2();
break;
case 3: l7q3();
break;
case 4: l7q4();
break;
case 5: h7q3();
break;
case 6: h7q4();
break;
}
} while (choice != 0);
return 0;
}