Question
In C language, Arrays Homework. As a practical joke, a friend gives you an int array for your birthday. As if that was not bad
In C language, Arrays Homework. As a practical joke, a friend gives you an int array for your birthday. As if that was not bad enough, your friend tells you that the array contains almost all 0's except for a small string of consecutive 1's contained somewhere in the middle. Overwhelmed by the novelty of this you decide to write a function that will print out the location of the first 1 in the array, the location of the last 1 in the array, and the total number of 1's in the list of consecutive 1 values. Given below is the function prototype: void joke (int num[ ], int max);
Where num is the array of int values and max contains the number of elements in the array
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started