After the following program is finished, how many bytes are written to the file t.dat?

```
import java.io.*;

public class Test {
public static void main(String[] args) throws IOException {
DataOutputStream output = new DataOutputStream(
new FileOutputStream("t.dat"));
output.writeChars("ABCD");
output.close();
}
}
```
a. 2 bytes.
b. 4 bytes.
c. 8 bytes.
d. 12 bytes.
e. 16 bytes.


c. 8 bytes.
Two bytes of Unicode for each character is written to output.

Computer Science & Information Technology

You might also like to view...

The guarantees offered by conventional servers may be violated by: i) physical damage to the host; ii) Errors or inconsistencies by system adminstrators or their managers; iii)successful attacks on the security of the system software; iv)hardware or software errors. Give two examples of possible incidents for each type of violation. Which of them could be described as a breach of trust or a criminal act? Would they be breaches of trust if they occurred on a personal computer that was contributing some resources to a peer-to-peer service? Why is this relevant for peer-to-peer systems?

What will be an ideal response?

Computer Science & Information Technology

You can use the IIf function anywhere you can use ________

A) queries B) expressions C) functions D) formulas

Computer Science & Information Technology

You can choose to format an index with or without tab leaders.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Use the Page Layout tab to insert section and page breaks into a document. _________________________

Answer the following statement true (T) or false (F)

Computer Science & Information Technology