Question: C++ QUESTION 1 QUESTION 1 Fill in the missing parts to the definition and instance below. When complete, the code should compile QUESTION 4 1.
C++
QUESTION 1
QUESTION 1 Fill in the missing parts to the definition and instance below. When complete, the code should compile QUESTION 4 1. Select valid C+code that performs a linear search on an array and returns the loca tion where the target was found. If the target was not found, it returns a location one past the last valid location Person None af thase int flnd(float array unsigned short size, float target) last name enun type fmale, female) gender; first name, l for (unsigned short i-o; icsize; ++i) if (arraylltarget) returl return tareet banjo maker banjo maker.first na banjo maker.last name-"Nechville"; banjo maker me-"Tom". int find (float arrayll, unsigned short sizc, float target) tor (unsigned short 1- 148ize 111) if (array- targat) ; assign the last, umused data member break; rcturn i; int findlfloat array uns1gnad short s1za, float targat:) I QUESTION 2 Select the items that are PREFERRED unsiuned short i-0 tor 14s1ze 1i) if (array[i]- target) hraak: rcturn i; vector over array standard library routine over prograuner written routine global over local struct over cas8 QUESTION 3 bool find (float array[], int size, float target) [ if (array-targat return true; return false It is preferred to delay constructing an object until after all the data required to construct the object is available. QUESTION 5 False 1. Using the STI. (standard template brary), the best [fastest) way to find the smallest number in an unsorted array (or vector) is to 1) sort the numbers from smallest to largest 2) return element at [0]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
