Computer
Science 2610
Spring
2000
Quiz
4
char mouse[30];
Suppose that a null-terminated string has been put in array mouse. Using the function numvowels, you would like to set integer variable v to the number of vowels in the string that is stored in array mouse. Which of the following statements will do the job?
(a) v = numvowels(“mouse”);
(b) v = numvowels(mouse[]);
(c) v = numvowels(mouse[30]);
(d) v = numvowels(mouse);
(a) log2(n)
(b) n
(c) n log2(n)
(d) n2
(a) 4
(b) 6
(c) 8
(d) 10
(a) log(n)
(b) n
(c) n log(n)
(d) n
(a) lenstr
(b) strlen
(c) length
(d) stringlen
int
T[10][20];
You would like to select the member of T that is in the upper left-hand corner. (That is, it is in the first column and the first row of the array.)
Which of the following expressions returns that value?
(a) T[0,0]
(b) T[0][0]
(c) T[1,1]
(d) T[1][1]