How would a writer structure a narrative for a comedic ending?

A) by having the main character suddenly experience an unpleasant surprise
B) by having the main characters suffer the consequences for their actions
C) by having the main character have a conversation that leads to disappointment
D) by having the main characters resolve conflicts in a peaceful way

B) by having the main characters suffer the consequences for their actions