If a random access file contains a stream of characters, which of the following statements would move the file pointer to the starting byte of the fifth character in the file?

a. file.seek(4);
b. file.seek(8);
c. file.seek(10);
d. file.seek(5);


b. file.seek(8);

Computer Science & Information Technology

You might also like to view...

What would be the result after the following code is executed?

``` final int SIZE = 25; int[] array1 = new int[SIZE]; ... // Code that will put values in array1 int value = 0; for (int a = 0; a <= array1.length; a++) { value += array1[a]; } ``` a. value contains the highest value in array1. b. value contains the lowest value in array1. c. value contains the sum of all the values in array1. d. This code would cause the program to crash.

Computer Science & Information Technology

In a PreparedStatement, parameters are counted from position ________.

a. 0 b. 1 c. 2 d. 3

Computer Science & Information Technology

You can convert a tabbed document into a(n) ____ window.

A. floating B. double C. locked D. untabbed

Computer Science & Information Technology

Fill in the missing step in the following deadlock situation. Two users from the local board of education are each running a program (P1 and P2), and both programs will eventually need two DVD drives to copy files from one disc to another. Only two DVD-R drives are available and they're allocated on an "as requested" basis. Soon the following sequence transpires:1. P1 requests drive 1 and gets it.2. ____3. P1 requests drive 2 but is blocked.4. P2 requests drive 1 but is blocked.

A. P1 requests drive 2. B. P2 requests drive 2 and gets it. C. P2 requests drive 1 but is blocked. D. P1 releases drive 1.

Computer Science & Information Technology