I understand the differences between fgets() and fgetss() but I don’t get the difference
Share
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.
fgetsreads a line — i.e. it will stop at a newline.freadreads raw data — it will stop after a specified (or default) number of bytes, independently of any newline that might or might not be present.Speed is not a reason to use one over the other, as those two functions just don’t do the same thing :
fgetsfread.