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
Do you know what happens when you call the out function on your own to open a file when it doesn't exist?
In C++, my program reads from a file, each line of the text file ends in a 1 or 0. How do you make a function that updates the value in the text file to change to from 1 to 0 or 0 to 1?
Answer the given question with a proper explanation and step-by-step solution.  1- Write code that does the following: opens an output file with the filename number_list.txt, uses a loop to write the numbers 1 through 100 to the file, then closes the file.
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