1. Engineering
  2. Computer Science
  3. write a c program that finds the index of the...

Question: write a c program that finds the index of the...

Question details

Write a C program that finds the index of the first element of an input array that contains the value zero, starting from position index.As part of the solution, write and call the function find() with the following prototype.x is the size of the array. If no element of the array from position index to the end of the array contains the value zero, then the function should return -1. If element of the array from position index to the end of the array contains the value zero print the index value.

int find(int num[], int x, int index);

Enter the length of the array: 5

Enter the elements of the array: 8 0 0 3 9

Enter the start position(index) for the searching: 0

Output: 1

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution