If I open a file and use fscanf to read a file like this:
2 41
1 50
1 46
….
How do I tell C to read the first number and store it as a variable, then the second as another variable, run a loop, then move on to the next set?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A loop like this is what you’re after: