Create an array of size given by the user. Write a function to find a number taken
Fantastic news! We've Found the answer you've been seeking!
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 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
Related Book For
Data Structures and Algorithms in Java
ISBN: 978-1118771334
6th edition
Authors: Michael T. Goodrich, Roberto Tamassia, Michael H. Goldwasser
Posted Date: