Question: C programming help!!! Answer in an easy-to-read manner! : ADT abstract data type Implement a counter ADT using a struct and four functions. A counter
C programming help!!! Answer in an easy-to-read manner!:

ADT "abstract data type" Implement a counter ADT using a struct and four functions. A counter is a simple device we can use to count up from zero. Think of the clickers that are used to count the number of create counter (creates a counter people that pass a door or who are in an audience. The struct should contain a string for a counter's name, and a number for the value. based on a name, initializes the count, and returns it), increment (takes a counter and increases it value by one), tally (returns the value of a counter), and display (prints out the counter with the format "NAME shows VALUE."). The specific syntax for these functions is shown indirectly at the bottom of the page - there is sample code that uses the counter ADT and the output of running it. //a struct to contain counter information struct counter..> close this brace off as needed //function to create counters C program question //function to increment a counter //function to get a counter's tally Show all of your work AND explain your answer CLEARLY //function to display a counters tally Follow these directions for a //SAMPLE USAGE void main() 1 struct counter c1-create_counter( First); struct counter c2 c1; increment (&c1); increment(&c2); display(&cl) I/output: First shows 1 display (&c2); //output: First shows 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
