doc
Files with .doc extension represent documents generated by Microsoft Word or other word processing documents in binary file format.
The extension was initially used for plain text documentation on several different operating systems.
It can contain several different types of data such as images, formatted as well as plain text, graphs, charts, embedded objects, links, pages, page formatting, print settings and a lot others.
The format was popular for all sorts of documentation due to the variety of options it offers to users for writing manuals, proposals, specifications, resumes, articles or any similar documents.
The updated version of DOC is DOCX which is based on Office OpenXML whose specifications are openly available.
rtf
Introduced and documented by Microsoft, the Rich Text Format (RTF) represents a method of encoding formatted text and graphics for use within applications.
The format facilitates cross-platform document exchange with other Microsoft Products, thus serving the purpose of interoperability.
This capability makes it a standard of data transfer between word processing software and, hence, contents can be transferred from one operating system to another without losing document formatting.
The file format specifications are available by Microsoft for public download and can be referred to from developer’s perspective.