Computer Science 101 Quiz B Name ______________________ 1. The basic strategy of the insertion sort algorithm that was presented in class was to: a. read all the the values into b. as each value was read in store it an array and then rearrange to the "front" (spot[0]) of the array them into sorted order and then move it to the correct spot. c. as each value was read in shift d. as each value was read in shift values to the "left" and then values to the "right" and then store the new value in the correct store the new value in the correct spot. spot. 2. Suppose int array[100] is being used in an insertion sort and its current values are array[0] = 2 and array[1] = 14. Further suppose that a value of 1 is read in next. After the value of 1 is inserted the new state of the array is a. {1, 2, 14} b. {0, 14, 1} c. {14, 2, 0, 1} d. {14, 2, 0} 3. Suppose the following code is executed char words[20]; int howmany; howmany = fscanf(stdin, "%s", &words[0]); while (howmany == 1) howmany = fscanf(stdin, "%s", &words[0]); and the contents of the standard input is: abc 123 xyz at EXIT from the loop a. words[0] contains the string b. words[0] contains 'a' "abc" words[1] contains "123" words[1] contains '2' and words[2] contains "xyz" words[2] contains 'z' c. words[0] contains 'a' c. words[0] contains 'x' words[1] contains 'b' words[1] contains 'y' words[2] contains 'c' words[2] contains 'z' 4. Suppose I declare the following values: char testword[] = "hello"; char hello[] = "hello"; If I then write the statements if (testword == hello) fprintf(stdout, "yes\n"); else fprintf(stdout, "no!\n"); the output I should expect is: a. no! b. yes