The only diffrence is the while loop and the declaration of spaceOcured. There is no sense that mod2 is not created. Create a new dir and copy the c file and the modt.txt. Try again. It should create the file modt2.txt. Do you heve this error message error:unable to open the filed? If U still have problem comment the while loop and leave only the fopen functions and see the result.
none ....no error messgae displayed....when i run the exe... window screen is black then quits...
okie i'll try without the while loop