write a C programming

samie
stack_testcase.pdf

Here is the tes tca s e for the stack progr a m.

Run the progr a m Quit

Run the progr a m Pop – you sho ul d see an “emp ty” mes s age List – you sho ul d see an “empty” mes s a ge Push a 1 Push a 2 Push a 3 Push a 4 Push a 5 List – you sho ul d see the nu m b e r s 5, 4, 3, 2, 1 in that order Pop – mes s age indicating “5 was rem ove d” List – you sho ul d see the nu m b e r 4, 3, 2, 1 in that order Push a 6 List – 6, 4, 3, 2, 1 in tha t order Pop - “6 was remove d” Contin ue pop pi ng until you have remove d 4, 3, 2, and 1 Enter an invalid men u option to get the error mes s age Pop - “empty” mes s a ge shoul d appea r List - “empty” mes s a ge shoul d appea r pus h a 10 pop – 10 is remove d quit