Question: Write a simple and very basic C + + program ( using array ) : Exercise# 1 : Searching in arrays Declare two integer arrays
Write a simple and very basic C program using array:
Exercise#: Searching in arrays
Declare two integer arrays arr and arr of size Fill both arrays with the random numbers from to
Display two arrays side to side as shown in the sample output. Input an integer n Check if n is found
in any of the arrays and print its location if it is found. That is display all locations of n in each array, if any
Please note that your output will be different because the arrays are initialized randomly.
Enter a number:
was found in both arrays
Iocation of in Array #:
Location of in Array #:
Enter a number:
was found in array
Location of in Array #:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
