Question
For C programming I made this nested loop that is supposed to read a file and fprint when the certain number is reached. However, It
For C programming I made this nested loop that is supposed to read a file and fprint when the certain number is reached. However, It seems that the file isn't read completly and its search in the lines becomes inconsistent and it varies depending on which loop rotation it is on. Can someone tell me whats wrong?
This is the output from the printf that counts the value of x to check which line it is in after each iteration:
1234567891011121314151617181920211234567891011121314151617181920212212345678910111234567891011121314151617181920212223241234567891011121314151617181234567891011121314151617181920
and this is the file with the lines:
char line [500]; int i; //iterate labels found for (1 = 0; 1
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started