c++ Write a menu driven program that asks the user to enter max size of an integer array, and dynamically allocates memo
Posted: Tue Jul 12, 2022 8:22 am
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.
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.