Given the following function prototype void mystry(int list[], int size); and the declaration int alpha[50]; Which of the following is a valid call to the function mystry?
Given the following function prototype void mystry(int list[], int size); and the declaration int alpha[50]; Which of the following is a valid call to the function mystry?
Which of the following function prototypes correctly declares a one-dimensional array and its size as formal parameters? (i) void printList(int& [], int); (ii) void printList(int list, int);
Consider the following function definition. int strange(int list[], int listSize, int item) { int count; for(int j = 0; j < listSize; j++) if(list[j] == item) count++; return count; } Which of the following statements best describe the behavior of this function?
A.
This function returns the number of values stored in list.
B.
This function returns the sum of all the values of list.
C.
This function returns the number of times item is stored in list.
To design a general-purpose search function, searchList, to search a list, which of the following must be parameters of the function searchList? (i) The array containing the list. (ii) The length of the list. (iii) The search item. (iv) A Boolean variable indicating whether the search is successful.
To design a general-purpose sort function, sortList, to sort a list, which of the following must be parameters of the function sortList? (i) The array containing the list. (ii) The length of the list (iii) A Boolean variable indicating whether the sort was successful.