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

  Simulate a multi-partitioned memory management system

Processes are also to be terminated by a GUI action. With each process change a free memory list status is to be output clearly showing the list items and their sizes.

  Supposed to swap numbers

The program is supposed to swap numbers, but I am stuck something is wrong! It does not swap them it repeats the second number, please help to fix! Thanks, this is in C++.

  Program consisting of multiple objects

Write a program consisting of multiple objects which interact with each other by following appropriate design practices

  Why does the neverwet spray protect it from water

As is know, acetone is a polar molecule like water, so isn't it suppose to mix? So my question is: why does the Neverwet spray protect it from water but not from oils and detergents?

  Compute the average of each row

Write a program that prompts the user to enter 15 double numbers from the keyboard and save them into a 3 by 5 array in the main ( ). Then call a user-define function to compute the average of each row and print the original matrix and average of ..

  Function called timesten that returns back

Write a function called timesTen that returns back to the caller the value passed into the function multiplied by 10. If the value passed into the function is negative, the function also returns the string

  How do classes in c++ provide support for abstract types

How do classes in C++ provide support for abstract types? Provide an example

  Program that asks the user to enter the number of miles

Write a C - program that asks the user to enter the number of miles traveled and the number of gallons of gasoline consumed. It should then calculate and display the miles-per-gallon value. Confine your output to 1 decimal place.

  Inserts a node with info value x

Complete the code for a function that inserts a node with info      value x before, and a node with info value zafter,each node with      info value y in a linked list with first node pointer p.

  Define a string of four characters and converts

Write an assembly program that defines a string of four characters and converts it into an unsigned 16-bit integer.

  Write recursive and iterative versions of functions

Write recursive and iterative versions of functions that compute the sum of components of an array.

  Write a function to convert the two dimensional coordinates

Write a function to convert the two dimensional coordinates of a point from Cartesian system to polar system by using x and y as its parameters, returning r and using references to pass theta value.

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