Write a program that asks the user to answer some questions


Lab: File Input and File Output

Write a program that asks the user to answer some questions. First, you should ask the user if they want to load answers from a previously saved file. If they respond yes you should look for the file name of your choosing in the path of your choosing and try to load that. If no file was previously saved or they answered no, the user must answer 8 questions of your choosing. They can be simple (i.e. What is your favorite color?) or they can be difficult (i.e. When the zombie apocalypse comes would you sacrifice your friend for your own survival if need be?).

In your file you should save the questions and the answers on the same line so it will look like this:

What is your favorite color? How old are you?

By doing this we can read in an entire line and simply separate the question based on the location of the question mark, anything before it and including it is the question and anything after it is the answer.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Write a program that asks the user to answer some questions
Reference No:- TGS01089555

Expected delivery within 24 Hours