Determine by hand the output of each program listed on the following pages using
ID: 652103 • Letter: D
Question
Determine by hand the output of each program listed on the following pages using the data files shown below.
Contents of data file:
acrtjprltoiu
owhfdrtnfres
dnzzpogquse
Program:
#include <iostream>
#include <fstream>
using namespace std;
int main ( void )
{
int x,y,z;
ifstream infile("E:dat2.in");
infile >> x >> y >> z;
cout << "x = " << x << endl << "y = " << y << endl
<< "z = " << z << endl;
infile.close();
return 0;
X = ?
Y = ?
Z = ?
Explanation / Answer
infile >> x >> y >> z; //read first 3 integer from input file
there are no integer in input file so it will assign
Output would be:
X = 0
Y = 0
Z = 0
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.