What is the difference between fgets and fread




















Difference between fgets and fread Ask Question. Asked 8 years, 3 months ago. Active 1 year, 4 months ago. Viewed 16k times. Tarick Welling 2, 3 3 gold badges 16 16 silver badges 36 36 bronze badges. Add a comment. Active Oldest Votes. Jacob Pollack Jacob Pollack 3, 1 1 gold badge 15 15 silver badges 37 37 bronze badges.

Fair point though. Sakthi Kumar Sakthi Kumar 2, 13 13 silver badges 28 28 bronze badges. So would I use fgets to read multiple lines which are separated by new lines? Sign up or log in Sign up using Google. Sign up using Facebook.

Career Advice. Do you think a 50 year old male with no degree can still become a coder? Software Engineering Bootcamps worth consider? Achieving a true 3-Tiered Architecture through Load Balancing. Follow us! Get the Latest Bytes Updates. By using this site, you agree to our Privacy Policy and Terms of Use. Jul 16 '07 reply Message. Cancel Changes. Microsoft Excel How to implement control array with vba.

General hadr monitor script reply views Thread by suresh last post: by. General The research path of clustering reply views Thread by goatbishop last post: by. Please note: The contributions published on askingbox. They are not verified by independents and do not necessarily reflect the opinion of askingbox. Learn more. Ask your own question or write your own article on askingbox. Reply Positive Negative.

When to use which of these functions depends on what you would like to do: The function fgets reads a single line from a text file. It is reading until the end of the current line or the end of the file is reached. Therefore, if you would like to read one line from a text file, you should use fgets.



0コメント

  • 1000 / 1000