What creates irony in a work of literature?

What creates irony in a work of literature?
A. the contradiction between appearance and reality
B. the characters’ outrageous behavior
C. the skill of the writer
D. the puns, wordplay, and other humorous devices