GRE Computer Science Question 09
9. A researcher is preparing a questionnaire with 6 questions. The only possible responses to each question
are "Yes," "Maybe," and "No." The researcher wants to know how many people answer with any given
combination of responses. A programmer is designing a data structure to collate the responses to this
questionnaire. The programmer decides to use a base structure containing 6 memory locations, one for
each question. Each element will contain a 2 for "Yes," a 1 for "Maybe," and a 0 for "No." One person's
response may look like this:
1 2 2 1 0 1
The programmer then declares an array with one slot for each possible combination of responses. What will
be the number of entries in the array?
(A) 3 (B) 6 (C) 216 (D) 324 (E) 729