C rewind file pointer




















This is line 3. The first time we use fgets in line 10 , it reads the first line of the file and increments the file pointer so that when we apply a read operation to the file after this, it starts reading from the second line. The second time we use fgets in line 13 , it reads the second line of the file.

The third time we use fgets in line 18 , it should read the third line of the file. But since we use rewind in line 16 , the file pointer will be set to start of the file and the first line will be printed.

Keep Exploring. Related Courses. By signing up, you agree to our Terms of Use and Privacy Policy. Forgot Password? This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy.

Popular Course in this category. Course Price View Course. JavaTpoint offers too many high quality services. Mail us on [email protected] , to get more information about given services. Please mail your requirement at [email protected] Duration: 1 week to 2 week. Command Line Arguments. Operator in C. Next Topic C ftell function. Reinforcement Learning. R Programming. React Native. Python Design Patterns. Add a comment. The Overflow Blog. Podcast Making Agile work for data science.

Stack Gives Back Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Related Hot Network Questions. Stack Overflow works best with JavaScript enabled.



0コメント

  • 1000 / 1000