Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please use c++ and explain the code please. thanks Amestion 1 1. Implement the function in Array int arril. in arsize) This function is given

please use c++ and explain the code please. thanks image text in transcribed
Amestion 1 1. Implement the function in Array int arril. in arsize) This function is given arr, an array of integers, and its logical size, ar size. When called it returns the minimum value in arr. 2. Write a program that reads from the user a sequence of 20 integers unnecessarily different from one another into an array, and outputs the minimum value, and all the indices appears in the array Your program should interact with the user exactly as it shows in the following example: Please enter 20 integers separated by a space 14 5 12 5 6 14 5 12 14 12 14 6 8 7 5 136 9 2189 10 6 The minimum value is and it is located in the following indices: 1 3 6 14 Note: You may want to define additional functions for your program to use Question? A palindrome is a word, which reads the same backward or forward. For example, noon, Civic, roder, level, rotor, kayak, reviver, rececer, redder, medom, and refer are all palindromes a. Implement a function bool Palindrome (atring st) This function is given a stringate containing a word, and returns true and only if stris a palindrome b. Write a program that reads a word from the user and announces to the user if it is a palindrome or not. Your program should interact with the user exactly as it shows in the following example Please enter a word level level is a palindrome Question: Implement following functions: avoid reverse Array tint a l. Int Size That takes are, an array of integers, and its siz, arraize. When called, it reorders the elements of the array to appear in a reverse order For example, if an is an array containing 1, 2, 3, 4, after calling reverseArray, are will look like: 14.3.2.11 b. void removeOdd (int arr). Inte arrsize) That takes arr, an array of integers, and its size, size. When called the function alters are so that the only numbers in it at the end are the even ones, which should remain in their original relative order. Additionally, the function updates ar size soit contains the new logical size of the array after removing the odd numbers note that a size is a parameter used both for input and output) For example, if an is an array containing 11. 2. 3. 4. after calling removedd ar will look like 12, 41and the parameter arise will update to 2. Notice the values in art 121 and arr3 are discarded c void split Parity (int a l . Int ar size) That takes arr, an array of integers, and its size, Size. When called the function changes the order of numbers in are so that all the odd numbers will appear first, and all the even numbers will appear last. Note that the inner order of the odd numbers and the inner order of the even numbers don't matter. For example, if an is an array containing 11. 2. 3. 4. after calling split Parity, arr could look like: 13.1.2.4

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions