Use this program
to run certain function with array and stack. Function: search, insert,
show,
push and pop. Use a menu to make choice for run operation. I give you a
code
based on my algorithm. Try to find another algorithm and then make
code. Before
start learn about Array and Stack and difference between them.
#include<stdio.h>
#include<stdlib.h>
#define max
20
int
ARRAY();
int
STACK();
int
SEARCH(int
LA[max],
int
N);
int
INSERT(int
LA[max],
int
N);
int
SHOW(int
LA[max],
int
N);
int
PUSH(int
stk[max],
int
TOP);
int
POP(int
stk[max],
int
TOP);
int
main()
{
char
ch;
for(;;)
{
printf("\nMake a choice of
your operation:") ;
printf("\nA: for ARRAY
operation");
printf("\nS: for STACK
operation");
printf("\nX: for EXIT\n"); |
Showing posts with label stack. Show all posts
Showing posts with label stack. Show all posts
A program for function: Search, Insert, Show, Push, Pop || Array and Stack using Function call
Subscribe to:
Posts (Atom)