Question: Write a C program that reads a series of integer numbers and saves them into an array. Your program should then the user for an
Write a C program that reads a series of integer numbers and saves them into an array.
Your program should then the user for an integer to search within the array. If the value
exists within the array, the program should indicate where the value was found. If the
value doesnt exist in the array, the program should report that the value is not in the
array.
Requirements:
Use pointer notation and pointer arithmetic to solve this problem.
You can only use the operator to declare the array. The operator should not be
used anywhere else in your program.
Example Interaction user input is underlined; your program must follow this format
precisely without the underline:
$ gcc Wall alinear.c
$ aout
Enter the number of input integers to stop:
Invalid number
Enter the number of input integers to stop:
$
$ aout
Enter the number of input integers to stop:
Enter numbers:
What is the search number?
Not found: is not in the array.
Enter the number of input integers to stop:
$
$ aout
Enter the number of input integers to stop:
Enter numbers:
What is the search number?
Found: is in position in the array.
Enter the number of input integers to stop:
$
$ aout
Enter the number of input integers to stop:
Enter numbers:
What is the search number?
Found: is in position in the array.
Enter the number of input integers to stop:
Enter numbers:
What is the search number?
Not found: is not in the array.
Enter the number of input integers to stop:
Enter numbers:
What is the search number?
Found: is in position in the array.
Enter the number of input integers to stop:
$
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
