c++ Write a menu driven program that asks the user to enter max size of an integer array, and dynamically allocates memo

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

c++ Write a menu driven program that asks the user to enter max size of an integer array, and dynamically allocates memo

Post by answerhappygod »

c++
Write a menu driven program that asks the user to enter max sizeof an integer array, and dynamically allocates memory for thearray. It then asks the user to enter array elements. The programshould ask user for a search value and then present a menu to userwith the following options:
1. Type 1 for Linear Search
2. Type 2 for Binary Search
3. Type 0 to exit
Write functions to implement linear search and binary searchthat return index value. Based of the returned result print ifvalue was found or not found. remember to deallocate memory. NOTE:DO not use [] for arrays. Use pointer notation only.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply