4. (10pt) Files and Stacks] S you will just use it in uppose you are given the stack h and its implementation stack.c. So your application (client) program below. Here are the important things i stack.h #ifndefstackh #definestackh #include "genlib.h" – – – – typedef void stackElementT typedef struct stackcDT stacKADT: stackADT void void stackElementr int #endif NewStack (void); FreeStack (stackADT stack) Push (stackADT stack, stackElementT element) Pop (stackADT stack) StackIsEmpty (stackADT stack) Please note that the stackElementT is void , so to store your data (e.g., int), you need to first allocate memory for your data (e.g., int), save your data at that address, and push that address onto stack. When you pop, you will get the address of your data. By dereferencing it, you can access your data. Now you are asked to complete the application (client) program in the next page. This program simply reads the integer numbers in each line from an input file, AND prints the same numbers from each line into another file while reversing their order. Using stack library will make this reversing task easy! For example, input.txt 4 23 45 2 56-1 3 51 34 -1 -1 3 4 -1 output.txt 56 2 45 23 4 1 34 51 3-1 -1 4 3-1 →( Your Program As seen in the above example, each line ends with a special value (-1) to indicate the end of line. After printing the numbers before -1 in reverse order, you should also print -1 and 'In' to indicate the end of each line in output file, too. Make sure you check and release dynamic allocations and structures. Also close files…
HOW OUR WEBSITE WORKS
Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of
HIGH QUALITY & PLAGIARISM FREE.
To make an Order you only need to click PLACE ORDER on top of this page and we will direct you to our Order Page at WriteDen. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Deadline range from 6 hours to 30 days.
Once done with writing your paper we will upload it to your account on our website and also forward a copy to your email.
Upon receiving your paper, review it and if any changes are needed contact us immediately. We offer unlimited revisions at no extra cost.
Is it Safe to use our services?
We never resell papers on this site. Meaning after your purchase you will get an original copy of your assignment and you have all the rights to use the paper.
Our price ranges from $8-$14 per page. If you are short of Budget, contact our Live Support for a Discount Code. All new clients are eligible for 15% off in their first Order. Our payment method is safe and secure.
Please note we do not have prewritten answers. We need some time to prepare a perfect essay for you.
Interested in purchasing an essay from us? Click PLACE ORDER on top of this page