Can anyone tell me what would happen if the main character dies in the story?
Death of the main character fits into different genres and serves its purpose in different ways there.
- Tragedy (ex: Romeo and Juliet). The protagonist(s) fail in their endeavor and die tragically. This is sad to the reader. But sometimes it is all right to be sad.
- Make believe (ex: Sleeping Beauty). The protagonist appears to die, while later is revealed to be all right. A very strong dramatic effect, and hard one to execute without falling into cliches.
- Story of a lifetime (ex: Citizen Kane). The story is really not about death, but about life. Readers accept main charater's death without many tears, even if he/she is very likable.
- Not the real main character (ex: Game of Thrones). The character dies, but the story moves on. Can make some readers upset and make them stop reading.
Other examples (in movies):
American Beauty: The main character (also the narrator) dies. Actually the story is being narrated after he dies - we only see it at the end.
The Boys in Company C : (generally same as the above)
"Joy" : A main character (Joy's other) is narrator too. She dies 1/2-3/4 through the story but continues to narrate. Interesting.
Star Wars: Obi Wan is killed (somewhat of a surprise) - but sort-of comes back a few times, in spirit, to mentor Luke Skywalker.
The Untouchables: Malone - one of the main characters - brutally murdered. The younger "disciple/prodigee" (Elliot Ness) avenges Malone's death and carries on the legacy. A VERY common theme. (similar to Star Wars, above).
Pulp Fiction: Does this in a really interesting way. One of the main characters, actually the star of the film (Vincent Vega - played by John Travolta) dies halfway through the story - but because of the non-chronological way the story is told, se see several important acts of the movie, with him very much alive.
So, those are a few examples.