Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Identify and fix the errors in the following lines of code: include[stdio.h] #in

ID: 3659918 • Letter: I

Question

Identify and fix the errors in the following lines of code: include[stdio.h] #include#include(time.h); void makerand(); return rand()+1; int main() [ int x(7): int *y; int z; float p; int j; FILE fp; srand(); *fp=fopen('indata,txt' 'r') y=int*call(7,sizeof(float)); for(j==0; j>7; j+;); { fscan(fp "%c", x()); y=x()*2; z=makerand; p+=(y/(z*.1)); } print('x()=%f',x); print('y()=%f',y); print('p=%.2d',p); ]

Explanation / Answer

Hope it helps #include #include int makerand() { return rand()+1; } int main() { int x(7); int *y; int z; float p; int j; FILE fp; srand(); *fp=fopen('indata,txt' 'r'); y=int*call(7,sizeof(float)); for(j==0; j>7; j+;); { fscan(fp "%c", x()); y=x()*2; z=makerand(); p+=(y/(z*.1)); } print('x()=%f',x); print('y()=%f',y); print('p=%.2d',p); }