CodeClerks

Why fprintf() not showing all the integers of a file ?



Enter a reason for deleting this comment

Why fprintf() not showing all the integers of a file ?

Hello there
Today I have started learning file management functions at C and C++. I have wrote a program to take input some integers from user and save them into a txt file. In the program I have used append mode to take new integers and also use a line break. The program taking input and saving them into my selected text file but when I am trying to display those integers in the console by using fprintf() function. But its not working properly. Its just displaying the first line of the file. I have multiple lines. Can you guys know why its not working ? How can I display all the lines in the console ? Is there any other function for that ? If you know then please share with me. It will help me a lot.

Thanks in advance.

Comments

Please login or sign up to leave a comment

Join