Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I'm having some trouble with my assignment and I was wondering if someone would be able to develop the code in C Programming to see

image text in transcribed

I'm having some trouble with my assignment and I was wondering if someone would be able to develop the code in C Programming to see what I'm missing? It is due Thrusday, April 19th. Thank you.

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: 1. 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 sections where you are to enter 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 call it data.txt so that it has the following numbers in order 012345678901234567890 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 teo 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 Is from the array. The function MUST return the totalcount which will be the total of ones and zeros found. Display the number of Os (numZeros) and number of 1s (numOnes). The number of Os and Is MUST be printed from main0. Also print the totalcount from main. To be clear numZeros &umOnes will be passed to countZerosOnes by pointers and totalcount will be returned from countZerosOnes

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

Programming The Perl DBI Database Programming With Perl

Authors: Tim Bunce, Alligator Descartes

1st Edition

1565926994, 978-1565926998

More Books

Students also viewed these Databases questions

Question

1. What are digital media?

Answered: 1 week ago