Question: Write a menu driven program with the menu options: 1. Insert Numbers 2. Edit Numbers 3. Search Number 4. Print Numbers 5. Current No. of

Write a menu driven program with the menu options:
1. Insert Numbers
2. Edit Numbers
3. Search Number
4. Print Numbers
5. Current No. of Records
6. Exit


Program should be implemented with arrays, pointers and functions. Maximum 50 numbers
are allowed by the user to enter. Each menu option should be implemented in separate
function.
Some more details about each menu option:
1. Insert Numbers


Keep asking user to add number into array one by one until user enters 0 as a number (which
means that 0 is not allowed to enter as a number). If user already added numbers before then
add numbers at the end of the array. When
maximum limit reaches then inform user about that
and do not allow entering any more numbers.
2. Edit Numbers

Ask position in array at which user want to edit the number and also ask which number user
want to replace with. When there is no number has been entered by the user at that location
then just replies with a message that the specified position is empty.

3. Search Number
Ask user to enter a number to search from the added numbers (means in array). If number is
found then tell the position of the number in the array. When the number exists at multiple
positions in array then tell no. of occurrences and their respective positions. When number is
not found then reply with a message that number does not exists in array.

4. Print Numbers

Print all numbers entered by user and their respective locations.
5. Current No. of Records

Display total numbers entered so far by the user.

6. Exit
Exit program


Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Document Format (2 attachments)

PDF file Icon

636037819b47f_233784.pdf

180 KBs PDF File

Word file Icon

636037819b47f_233784.docx

120 KBs Word File

Students Have Also Explored These Related Programming Questions!