Array Manipulation Hint: the answer should need to link together with a c code and output In this question, you develop a code capable of doing array manipulation. Your program will have the following menu. This code should be completely modular so that for each of the menu options (except for probably a couple of them) a function should be called. 1- Enter the size of the array 2- Enter the array elements 3- Sort the array 4- Find a number within the array 5- Print the array 6- Reverse print the array 7- Quit

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 8RQ
icon
Related questions
Question
  1. Array Manipulation

Hint: the answer should need to link together with a c code and output

In this question, you develop a code capable of doing array manipulation. Your program will have the following menu. This code should be completely modular so that for each of the menu options (except for probably a couple of them) a function should be called.

1- Enter the size of the array

2- Enter the array elements

3- Sort the array

4- Find a number within the array

5- Print the array

6- Reverse print the array

7- Quit

A sample run of the program is as follows:

1- Enter the size of the array

2- Enter the array elements

3- Sort the array

4- Find a number within the array

5- Print the array

6- Reverse print the array

7- Quit

Please enter your choice: 0

That’s not a valid choice

Please enter your choice: 2

You should first set the size of the array

1- Enter the size of the array

2- Enter the array elements

3- Sort the array

4- Find a number within the array

5- Print the array

6- Reverse print the array

7- Quit

Please enter your choice: 3

Your array is not initialized yet!

1- Enter the size of the array

2- Enter the array elements

3- Sort the array

4- Find a number within the array

5- Print the array

6- Reverse print the array

7- Quit

Please enter your choice: 4

Your array is not initialized yet!

1- Enter the size of the array

2- Enter the array elements

3- Sort the array 4- Find a number within the array

5- Print the array

6- Reverse print the array

7- Quit

Please enter your choice: 1

What is the size of your array (1-20)? 25

Array size should be between 1 and 20

What is the size of your array (1-100)? 8

Array size set

1- Enter the size of the array

2- Enter the array elements

3- Sort the array

4- Find a number within the array

5- Print the array

6- Reverse print the array

7- Quit

Please enter your choice: 3

Your array is not initialized yet!

1- Enter the size of the array

2- Enter the array elements

3- Sort the array

4- Find a number within the array

5- Print the array

6- Reverse print the array

7- Quit

Please enter your choice: 2

Enter array element 1: 0

Enter array element 2: -2

Enter array element 3: 7

Enter array element 4: 4

Enter array element 5: 3.5

Enter array element 6: 9.4

Enter array element 7: 1.9

Enter array element 8: 202

Array elements have been received

1- Enter the size of the array

2- Enter the array elements

3- Sort the array

4- Find a number within the array

5- Print the array

6- Reverse print the array

7- Quit

Please enter your choice: 3

Sorting the array.

Please choose Ascending/Descending (A/D)? M

That’s not a valid choice

Please choose Ascending/Descending (A/D)? A

Array sorted (Ascending)

-2 0 1.9 3.5 4 7 9.4 202

1- Enter the size of the array

2- Enter the array elements

3- Sort the array

4- Find a number within the array

5- Print the array

6- Reverse print the array

7- Quit

Please enter your choice: 4

Please enter a number to be searched in the array: 5

5 was not found in the array

1- Enter the size of the array

2- Enter the array elements

3- Sort the array

4- Find a number within the array

5- Print the array

6- Reverse print the array

7- Quit

Please enter your choice: 4

Please enter a number to be searched in the array: 7

7 was found at the position 6 in the array

1- Enter the size of the array

2- Enter the array elements

3- Sort the array

4- Find a number within the array

5- Print the array

6- Reverse print the array

7- Quit

Please enter your choice: 5

Printing the array

-2 0 1.9 3.5 4 7 9.4 202

1- Enter the size of the array

2- Enter the array elements

3- Sort the array

4- Find a number within the array

5- Print the array

6- Reverse print the array

7- Quit

Please enter your choice: 6

Reverse printing the array

202 9.4 7 4 3.5 1.9 0 -2

  

1- Enter the size of the array

2- Enter the array elements

3- Sort the array

4- Find a number within the array

5- Print the array

6- Reverse print the array

7- Quit

Please enter your choice: 7

Thanks and bye!

Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Passing Array as Argument
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,