Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a C Program that does the following:- a)Use #define directive to define SI

ID: 3616156 • Letter: W

Question

Write a C Program that does the following:-
a)Use #define directive to define SIZE as 100
b)Make an array of integers as big as SIZE
c)Initialize all the elements of this array to Zero
d)Repeatedly generate a random number "K" in the range of 0 to99
e)Go to the K'th element in the array,make it 1 if it is 0;let itbe 1 if it is already 1.
f)Maintain a count of the operation in step 'e'
g)Maintain also a count of how many elements have been made 1 inthe array.
h)When all the elements of the array have been made 1, print thecount of operations in step "e" and terminate the program.

Explanation / Answer

please rate - thanks #include #include #include #include #define SIZE 100 int main() {int num[SIZE],i,K,count=0,randoms=0; srand(time(0)); for(i=0;i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote