Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Kindly help Asap...thumbs up for correct answers...missing word in part b is invoke Problem #5 10 points) Write a complete C function named countdiv with

Kindly help Asap...thumbs up for correct answers...missing word in part b is invoke
image text in transcribed
image text in transcribed
Problem #5 10 points) Write a complete C function named countdiv with the following properties: 1) a) Has four parameters-an array A, the size n of the array, and pointer variables num3 and num5. Assuming integers for everything. The function returns nothing. 2) Keeps count of the total number of array elements that are divisible by 3, and the total number of elements that are divisible by 5. Hint:Think remainder 3) Send the final count values back to the caller by using the pointers num3 and num5. The function should be silent, i.e., it should not prompt for input nor should it print anything. Example: and two numbers divisible by 5 (i.e, 10) eents re 2. 5.1, 10,3,.4612.There are three numbers divisible by 3 (ie,3,6,.12) b) You are given the following fragment of code. Fill in the box with the correct arguments needed to inv the countdiv function. #define SIZE 8 int ary[SIZE] (2, 5, 1, 1e, 3, 4, 6, 12) int num3, num5; countdiv printf("num3 -kd num5 XdIn", num3, num5)

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

Database Design Application Development And Administration

Authors: Mannino Michael

5th Edition

0983332401, 978-0983332404

Students also viewed these Databases questions