Chapter 6: Problem 21
(This exercise is for those who have studied the optional section entitled
"File Names as Input." ) Suppose you are given the following string variable
declaration and input statement.
#include
Chapter 6: Problem 21
(This exercise is for those who have studied the optional section entitled
"File Names as Input." ) Suppose you are given the following string variable
declaration and input statement.
#include
All the tools & learning materials you need for study success - in one app.
Get started for freeWhat include directive do you need to place in your program file if your program uses the function exit?
Write some \(\mathrm{C}++\) code that will read a line of text and echo the line with all uppercase letters deleted.
Consider the following code (and assume that it is embedded in a com-
plete and correct program and then run):
cout << "Enter a line of input:\n";
char next;
do
{
cin.get(next);
cout << next;
} while ( (! isdigit(next)) && (next != '\n') );
cout << "
What characteristics of files do ordinary program variables share? What characteristics of files are different from ordinary variables in a program?
Suppose you are writing a program that uses a stream called fin that will be connected to an input file and a stream called fout that will be connected to an output file. How do you declare \(f\) in and four? What include directive, if any, do you need to place in your program file?
What do you think about this solution?
We value your feedback to improve our textbook solutions.