I want to know format of .doc in ms office. Who can help me?

I write some code to make a file with tail .doc but in Microsoft Office doesnt know this file. May be my file is not correct format of .doc.

PLease, help me.