Click here to Skip to main content
15,907,492 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

Im using fgets to fetch a string form my file.

Aint fgets supposed to return a null terminated string, instead i am getting a string with " as my last character.
Posted

1 solution

Sry its not " , its actually '\n'

had to check and replace it by '\0'.
 
Share this answer
 
Comments
Richard MacCutchan 25-Aug-12 4:30am    
See the documentation which explains this for you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900