I'm trying to make an small c application, and one of the features is to write an int to a file, but it doesn't work. I can write anything else, using write and fwrite, like strings and chars, but when I'm trying to write an integer the program only writes empty spaces in the file.