Answered step by step
Verified Expert Solution
Question
1 Approved Answer
objective: To show our understanding of arrays, specifically how to declare, initialize and manipulate the elements of an array. To further our understanding of functions,
objective: To show our understanding of arrays, specifically how to declare, initialize and manipulate the elements of an array. To further our understanding of functions, loops, conditional statements, data types and variables. Assignment: Write a program that uses an array to store a series of integers. The program should prompt the user to enter elements into the array. After the array has been filled, it should display the initial contents of the array. It should then perform operations to manipulate the elements of the array through specific functions. Note that if the annay is modified in any way, the program should re-display the contents of the array. Procedure: 1. Declare an array of integers of some pre-defined maximum size. You are free to decide the size of the array, but all the elements of the array should be initialized to zero. 2. Implement the following operations on the array through the specified functions: o input() This function prompts the user to populate the array with data entered from the keyboard. As this is an array of integers, the data should all be numeric integers. o display() This function outputs the contents of the array one element at a time. The array should be output using the following format: Postion Value 10 Note: position, represents the logical index of the array and value represents the numeric integer stored in the corresponding physical location. In other words position 1 corresponds to the value at arraylO
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