How can I read and write float values to and from a file (using fopen, fwrite etc.)

Ideally each float value would take up 4 bytes on the file, but I'm not sure how to do this. Can anyone help?