Question: what are the outputs Part III. Code trace. 20 points. Show all output. 1 // Note: This dictionary uses integers for keys and characters for
what are the outputs
Part III. Code trace. 20 points. Show all output. 1 // Note: This dictionary uses integers for keys and characters for values. 2 int keys [] = {0,1,2,3,4,5,6,7}; 3 char values[] = {'X','|', 'T', 'W', 'Q','C','H','Z'}; 4 Dictionary d; 5 6 bool bSearch(int data[], int nItems, int key) { 7 int low=0,mid, high=nItems-1; 8 9 for (int i=0;i data[mid]) 17 low = mid + 1; 18 else 19 high = mid; 20 } 21 22 if (key == data[low]) 23 return true; 24 else 25 return false; 26 } 27 28 int main(void) { 29 int num,data[] = {3,5,10,15,16,19,23,37}; 30 31 if (bSearch(data,8,11)) 32 cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
