Write a (very short) program that creates a serial text file holding just two or three names

Question:

Write a (very short) program that creates a serial text file holding just two or three names of your own choosing. After compiling and running the program, use the MS-DOS command type (or the equivalent command for your platform) to display the file’s contents. For example:

type names.txt  

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: