Question: Assignment 13B: You are to write a C program which includes the use of an array and 3 functions and follows the instructions below Follow

 Assignment 13B: You are to write a C program which includes
the use of an array and 3 functions and follows the instructions

Assignment 13B: You are to write a C program which includes the use of an array and 3 functions and follows the instructions below Follow these detailed instructions: . First, read this document in its entirety 2. Include the usual (detailed) comment block including program name, author, date, class & section # professor, inputs, outputs and description, followed by your preprocessor directives 3. An outline (Skeleton-code) of the source code is shown below and you are REQUIRED to follow this outline. Insert appropriate printf statements where needed to get the desired output. The outline has four sec tions where you are to ent er in your code and complete the program. a. Part 1: You are required to open a file for input and read the data in that file into an array (named data). Use the variable size to count how many elements in the file. Create the file yourself in notepad and ca t data.txt so that it has the following numbers in order: 0123456789 01 234567890 b. Part 2: You are required to write the function called display which accepts an array, and a parameter named size which indicates the size of the array. This function prints the array (using the following format. List => # # # # # #) to the screen. A sample output is shown below. Display the original data array c. Part 3: You are required to write the function called reverse which accepts an array, and a parameter named size which indicates the size of the array. This function reverses the values in the array. In other words, flip the array from beginning to end. Display the flipped array using the function display created in part 2. A sample output is shown below. You are not allowed to create an extra integer array to solve this part, i.e., only the array that was sent from the main function is to be manipulated d. Part 4: You are required to write the function call countZerosOnes which counts the Os and 1s from the array. The function MUST return the totalcount which will be the total of ones and zeros found. Display the number of 0s (numZeros) and number of (numOnes). The number of Os and Is MUST be printed from main0. Also print the totalcount from main . To be clear numZeros&numOnes w be passed to countZerosones by pointers and totalcount will be returned from countZerosOnes e. A sample output is shown below

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!