Question: 2. Write down the content of file Q2_Output.bd after programme P2 has run? [15 marks) Programme P2 #include #include main(void) int i, j, k,num_elem; int

 2. Write down the content of file Q2_Output.bd after programme P2

2. Write down the content of file Q2_Output.bd after programme P2 has run? [15 marks) Programme P2 #include #include main(void) int i, j, k,num_elem; int x [20],[20], [20]; FILE *infile, *outfile; infile = fopen ("D:\\Q2_Input.txt","r"); outfile = fopen ("D:\\Q2_output.txt", "w"); k = fscanf(infile, "%d%d",&x[0],&y[0]); fprintf(outfile, "k=%d ",k); fprintf(outfile, "value of EOF=%d ", EOF); i=1; while (fscanf(infile, "%d%d",&x[i],&y[i])!=EOF) i++; num_elem=i; fprintf(outfile, "x[i] y[i] z[i] "); for (j=0; j

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!