Fwrite and new line

i read a record with sc_select.
i wanna write in a text file with fwrite a row containg the first and the second field of the read record

but a the end of the first field there is a LF and the result is
00001
00002
and not 0000100002

how i remove the LF at the end of the field?

You Must concat your field and at end of bucle, you write it.