Program- file input and file output

Assignment Help C/C++ Programming
Reference no: EM13809326

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.

Reference no: EM13809326

Questions Cloud

Evaluate total annual compensation of a salesperson : Write a Java application using NetBeans Integrated Development Environment (IDE) that calculates the total annual compensation of a salesperson. Consider the following factors: A salesperson will earn a fixed salary of $45,000
Biographical information for each woman : Biographical information for each woman
How would broadway book shop go about developing : How would Broadway Book Shop go about developing its information systems and Justify your choice of your selected approach to systems development.
Describe knowledge retention of departing employees : Select and organization of your choice and examine the extent to which it has established any processes or procedures to ensure knowledge retention of departing employees.
Program- 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. What is your favorite color? How old are you
Significant problems for firms pursuing alliance strategies : If adverse selection, moral hazard, and holdup are such significant problems for firms pursuing alliance strategies, why do firms even bother with alliances? Why don't they instead adopt a "go it alone" strategy to replace strategic alliances?
Write a gui-based program that analyzes a round of golf : Write a GUI-based program that analyzes a round of golf. You will retrieve the data for 18 holes from a text file. On each line in the file will be the par for that hole (3, 4, or 5) and your core for that hole should be displayed in a label
Write a critical essay about movie the man who was not there : Write a critical essay about the movie The Man Who Wasn't There and Tay Garnett's 1946 film noir classic The Postman Always Rings Twice.
Explanation of how assumptions of the test were met or not : Explanation of how assumptions of the test were met or not met

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write a c++ program to calculate the sum

The list of all natural numbers less than 10 that are multiples of 3 or 5 is 3,5,6,9. The sum of these multiples is 23. Write a C++ program to calculate the sum of all such multiples less than 1,000.

  Write c++ program to create a bar chart showing the average

Write a c++ program to create a bar chart showing the average monthly mean temperature for College Station from 2004 to 2013.

  Write a c program that copies the contents of one file

write a c program that copiest the contents of one file to a destination file. This program works by first prompting the user for the name of the source file and destination file.

  Write a program to create a console application

Write a program to create a console application that allows the user to access sunrise/sunset almanac data for up to 30 days for a given choice of cities

  Prepare a program to implement a for loop

Prepare a program to implement a for loop - Program: Write a for loop that sums all the odd integers between 5 and 20 inclusive.

  Write a number guessing game in which the computer selects

Write a number guessing game in which the computer selects a random number in the range of 0 to 100, and users get a maximum of 20 attempts to guess it.

  Write a program that reads ten numbers

Write a program that reads ten numbers from input and prints them in reverse order.

  Evaluates the gross pay of a set of employees

Write a C program that will calculate the gross pay of a set of employees - determines both the overtime hours (anything over 40 hours) and the gross pay, and outputs

  You are to write a basic bank application

You are to write a basic bank application, in C++, that allows the user of the application to manually create, modify, and delete bank accounts. Before you write the application you will need to create a class called Account.

  Problem 1greatest common divisor write code for a recursive

problem 1greatest common divisor write code for a recursive implementation of euclids algorithm for searching the

  Discuss the differences concerning how a program would acces

Discuss the differences concerning how a program would access the members of objects that have been declared as an array of objects

  Lists of integers and displays whether the two are identical

Write a test program that prompts the user to enter two lists of integers and displays whether the two are identical. Here are the sample runs.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd