Expert Answers

What happens when you close a file with the Close method?

What is the difference between the WriteLine method and the Write method

The WriteLine() always appends a new line character to the end of the string. this means any subsequent output will start on a new line.

What has happened when the Peek method returns -1?

What does the Read method return?

Where must Structure statements appear?

Why should you call the Peek method before calling the “ReadLine” method?

What is wrong with the following code. Find the error

Suppose you wish to create a new file names NewFile.txt and write data to it. Write the statement neccesary to open the file assuming an application has an array of integers names intNumbers, write code that writes the contents of the array to the file numbers.txt