Which one of the following types of writing is considered formal?

AAn instant message to a co-worker about after-hours plans
BAn invitation to an anniversary party
CA personal email to a friend
DA cover letter with a job application