Answer:
The program equivalent in C++ is:
<em>#include <cstdio></em>
<em>#include <cstdlib></em>
#define SIZE 5
using namespace std;
<em>int main(int argc, char *argv[]) {</em>
<em>int numerator = 25;</em>
<em>int denominator = 10;</em>
<em>FILE * inPut = fopen(argv[1], "r");</em>
<em>FILE * outPut = fopen(argv[2], "w");</em>
<em>float result = (float)numerator/denominator;</em>
<em>fprintf(outPut,"Result is %.2f\n", result);</em>
<em>float arr[SIZE];</em>
<em>for(int i = 0; i < SIZE; i++) {</em>
<em>fscanf(inPut, "%f", &arr[i]);</em>
<em>fprintf(outPut, "%7.4f\n", arr[i]);</em>
<em>}</em>
<em>return 0;</em>
<em>}</em>
Explanation:
See attachment for explanation.
Each line were numbered with equivalent line number in the C program