Printing into a file
Hi I have a particularly creepy problem :( eating my head from quitea few days.
I have a large array of size say 3000, at the end of the program i have certain computations done and stored as elements of this array, now i want to print the elements from this array into a file.
I am using fprintf , and using a while loop to print until the length of the string is zero.
the problem is that i get empty lines added automatically in between and also that sometimes the data is broken into 2 lines when displayed. please help!
Post a compilable example. Chances are, though, some of the strings have the character '\n' embedded in them.