Question: What is the difference between these two lines of code?

  1. The first line will append the word `data` to file.txt and output it on the screen. The second line will append the word `data` only to file.txt.
  2. They are the same.
  3. The first line will append the word `data` to file.txt and there will be no output on the screen. The second line will output the word `data` on the screen and append it to `file.txt`
  4. Both lines will overwrite file.txt with the word data.

Answer: The correct answer of the above question is Option A:The first line will append the word `data` to file.txt and output it on the screen. The second line will append the word `data` only to file.txt.