Examlex

Solved

Given the Following Code

question 41

Essay

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 <fstream>
#include <cstdlib> // 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;
}


Definitions:

Globalization

The process whereby businesses, culture, and information spread worldwide, leading to increased interconnectedness and interdependence.

Infectious Disease

A disease caused by microorganisms, such as bacteria, viruses, fungi, or parasites, that can be spread, directly or indirectly, from one person to another.

Homicide

The act of one person killing another, whether lawfully justified or not, including murder and manslaughter.

African-American

An ethnic group of Americans with total or partial ancestry from any of the black racial groups of Africa.

Related Questions