Simple File Input

Start by creating a text file in Notepad (or Textpad) containing your first and last name, separated by whitespace. Save it as "name.txt".

Then write a program that opens that file and displays the two names on the screen, with no input from the keyboard.

Then try changing the name in the file, saving it again, and running the program again with no changes to confirm that it works.

Using my psychic powers (aided by reading data from the file), I have
determined that your name is Horace Mann.



©2013 Graham Mitchell

This assignment is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License.
Creative Commons License