C How to Program (8th Edition)
C How to Program (8th Edition)
8th Edition
ISBN: 9780133976892
Author: Paul J. Deitel, Harvey Deitel
Publisher: PEARSON
Question
Book Icon
Chapter 11, Problem 11.15E
Program Plan Intro

Program plan:

  • ichar, line,ifilename,ofilename, i, choice, and x are input variables
  • rfptr, wfptr are the file pointers to write the data.

Program description:

The main purpose of the program is to read and write the entered text line using file pointers either using the standard input and output or using the input and output file. The program first displays the menu to the user to select the choice which does not allow to enter invalid choice. It then uses the standard input and output or file names to get the data and display the data according to user choice with the help of file pointer.

Blurred answer
Students have asked these similar questions
Answer the given question with a proper explanation and step-by-step solution.
DO NOT WRITE MAIN! Only write the function.  A 50% minimum deduction will be made if main is included.  No libraries or comments should be specified.  (OP4) Write a function to prompt the user for the filename, open the file, and verify that it opened. If the file does not open, an error message should be printed and the user re-prompted. The function should use the string passed in for the prompt string. The function should not return until the file is open. The function prototype: void openInputFile( ifstream &, string ); ifstream& - the stream to be opened. string - the prompt to be written out to the user.  Use this string when prompting the user.
write in python Note:- Do not provide handwritten solution. Maintain accuracy and quality in your answer.  Take care of plagiarism. Answer completely. You will get up vote for sure.
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr