Question: Create an array of size given by the user. Write a function to find a number taken as input from user. Your task is to


Create an array of size given by the user. Write a function to find a number taken as input from user. Your task is to print the index of the number using pointer to travel the array.

Input Format

Firstly, take array size and elements as input. Then take a value to search in array.

Constraints

void find(int *pA, int sA, int v)

Note that if number is found at multiple position you should print all position.

Output Format

Your task is to print the index of the number using pointer to travel the array.

Sample Input 0

61 2 3 2 4 22

Sample Output 0

2 found at index 22 found at index 42 found at index 6

Create an array of size given by the user. Write a function

Create an array of size given by the user. Write a function to find a number taken as input from user. Your task is to print the index of the number using pointer to travel the array! Input Format Firstly, take array size and elements as input. Then take a value to search in array. Constraints void find (int *pA, int sA, int v) Note that if number is found at multiple position you should print all position. Output Format Your task is to print the index of the number using pointer to travel the array. Sample Input 0 6 123 24 2 2 Sample Output 0 2 found at index 2 2 found at index 4 2 found at index 6 Explanation 0 **Input* Here, Array size: 6 Array elements: 1 2 3 2 4 2 Search value: 2 **Output**: 2 found at index 2 2 found at index 4 2 found at index 6

Step by Step Solution

3.41 Rating (154 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

include void findint pA int sAint v i... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!