Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started