#include <stdio.h>

unsigned char header[] = {0x4D, 0x4D, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x14};

main()
{
    FILE	*fp;
 
 
 	if((fp = fopen("tifftest.tif", "wb")) == NULL)
 	{
 		printf("\nCannot open file");
 		return 1;
 	}
 	else printf("\nWriting tiff file...");
    
    fwrite(header, sizeof(char), sizeof(header), fp); 
   
    fclose(fp);
}