What is the result?

Given that myfile.txt contains:

What is the result?

Given that myfile.txt contains:

What is the result?

A.
new file.txt contains:
1: First
2: Second
3: Third

B.
new file.txt contains:
1: First 2: Second 3: Third

C.
newfile.txt is empty

D.
an exception is thrown at runtime

E.
compilation fails

Explanation:

For each line in the file myfile.text the line number and the line is written into newfile.txt.



Leave a Reply 1

Your email address will not be published. Required fields are marked *