What is the return value of "SELECT".substring(0, 5)?

a. "SELECT"
b. "SELEC"
c. "SELE"
d. "ELECT"

b Note that the sustring is from index 0 to 4, which is 5 - 1 . The correct answer is B.

Computer Science & Information Technology

You might also like to view...

What is wrong with the following recursive function? It should print out the array backwards.

void print(int array[], int start, int size) { if(start == size) return; else { print(array, start-1,size); cout << array[start] << endl; } } a. infinite recursion b. the stopping condition is wrong c. the recursive call is wrong d. A and C e. nothing

Computer Science & Information Technology

The strtol and stroul functions do not:

a. Need a header file to be used. b. Take three arguments. c. Have the same return types. d. Have the ability to return data in base 8.

Computer Science & Information Technology