this program imitates the capabilities and function of a 4GB(4096mb) flash disk. It must contain the ff.functions and declerations.
void Format(void);
int Copy(int size);
int Delete(int size);

int freeMem = 4096;
*freeMem - holds the remaining space of the flash disk,initialize to 4096.

Format() - erase all contents of the flash disk
Copy() - copies a file with a specified size to the disk. If size is larger than the free space,Copy() fails. Returns 1 successful,otherwise returns 0;
Delete()-deletes a file with a specified size from the disk.If size is larger than the used space,Delete() fails. Returns 1 successful,otherwise,returns 0

Ok code it... Conceptually everything is right.