Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Repost again C LANGUAGE,, pls dont copy already posted solutions for this problem on chegg.. ive seen most of those and most of them ARE

image text in transcribedRepost again C LANGUAGE,, pls dont copy already posted solutions for this problem on chegg.. ive seen most of those and most of them ARE wrong..(i would be force to hitunlike button if u do, coz it wont help me)
Pls help in this without simply using those wrong codes already posted in chegg..
Also pls use basic functions and codes in C LANGUAGE.. im only a beginner in c program and i just need help to compare my work for this problem that whenever i run my codes i still got errors..
Pls use ONLY BASIC CODES AND FUNCTIONS in c language so i would be able to compare my codes to u,,coz like i said im a beginner.. i may not be able to understand it so pls keep the codes basic coz i only use basic codes and functions for this sample problem..
Show clear and correct codes.
Any helpful help would be appreciated.
Main topics: Arrays &Pointers Memory allocation Program Specification: A stack is a container that can be defined in terms of an array where all adds are preformed at the end of the sequence of existing values, and all removes are also preformed at end of the sequence of existing values. An empty stack is one that has no existing values in the array at all. We use the notion of top of the stack to keep track of (at which index) a new value in the sequence is to be added. Hence, an empty stack is one in which top is equal to 0 and a full stack is one in which top is equal to the array's physical size - capacity For this assignment, you will write a C program to create and use an array based stack Requirements You must write a C program which satisfies the following: Your C program must dynamically allocate the memory for the underlying array of float values, with a capacity of 1024. Your C program must dynamically free this memory before termination. Your C program must declare and define functions to: Create an empty stack (of float values) with a capacity of 1024. Test to see if the stack is empty - Test to see if the stack is full - Push (add) an item (a float value) onto the stack - if not already full Pop (remove) an item (a float value) from the stack - if not already empty . Your C program must define a main function to fully test all of the above funcionality. Notes: 1. A stack is really three separate data items: (a) a float pointer to the array (b) an int top index indicator (e) an int capacity (physical size of the array) 2. The effective size of the stack (aumber of items in the stack) can be deduced from the top index indicator

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

Students also viewed these Databases questions

Question

design a simple performance appraisal system

Answered: 1 week ago