You need to better explain your problem because right now it is not clear, where do you want to print it, to the file? or???
int is already 32 bit you don't need to do anything to convert. If you want to print it to the disk file as series of bytes (binary), you just use fwrite
// C/C++ code, not AFL
int yourvar = 6;
FILE *fh = fopen("file.bin", "wb" ) ; // binary write
if( fh )
fwrite( &yourvar, 4, 1, fh ); // write 4 bytes
fclose( fh );