Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C; lets say i have a char array that has . Please help me solve this with the following requirments...the code follows stack

In C; lets say i have a char array that has ". Please help me solve this with the following requirments...the code follows stack method ( Last in, First out) ...assume the functions are built in for this example:

1) If the charaters are between "<" and ">"...you have to call push(char *s ) function (that accepts strings) on those specific characters ....For example the first "Hi" is between "<" and ">"...so "Hi" should be sent into push(char *s) function. After that the other character between "<" and ">" is "Hello" so the function push(char *s) should be used on "Hello" and so on.

Note: You dont need to write the function push(char *s)...pretend it works...if you want to know how it works..its the same as stack.every time something is pushed it goes on top and if pop() is called that top element is then removed.

2) if the character are between "<" , "/" and ">"...then call the Pop() function (that accepts no parameters) on the character...For example should be the first time pop() function should be invoked...and there should be no trace of "Bye" left in the array and then the next element that should be popped is "Hello" and then "Hi".

Thank you!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Donald A. Carpenter Fred R. McFadden

1st Edition

8178088045, 978-8178088044

More Books

Students also viewed these Databases questions