Given the following code. The input file, in.dat, is a copy of the program code in this problem. How will the output file, out.dat, differ from the input file?

```
// file: testQuestion.cc
// test question: copy files: in.dat to out.dat
// in.dat is a copy of a file containing this code.
// use EOF to terminate copy loop
#include
#include // for exit()
using namespace std;

int main()
{
ifstream in;
ofstream out;
in.open("in.dat");
out.open("out.dat");
while(in >> ch)
out << ch;
return 0;
}
```

The code line
in >> ch
will ignore all white space (blanks, tabs, end of line) in the input file. The output in the file, out.dat will be nearly useless. For example, every variable declaration will have the necessary space between the type and the identifier removed.

Computer Science & Information Technology

You might also like to view...

Which of the following would cause an error in a program?

a. attempting to store a floating-point value in a variable with Integer data type b. attempting to store a floating-point value in a variable with String data type c. attempting to store an integer in a variable with String data type d. All of these would cause errors.

Computer Science & Information Technology

Describe the main strategies that can be used to create persistent objects.

What will be an ideal response?

Computer Science & Information Technology