During the battle of Hogwarts, in Harry Potter and the Deathly Hallows, we learn that Lavender Brown ends up dying.
However, it's been a while since I read the books, so, I was wondering, of the 40 children in Harry's year, who else dies, and how?
The only confirmed death in Harry's year was Vincent Crabbe.
Malfoy fell off the broom and lay facedown, gasping, coughing, and retching. Harry rolled over and sat up: The door to the Room of Requirement had vanished, and Ron and Hermione sat panting on the floor beside Goyle, who was still unconscious.
“C-Crabbe,” choked Malfoy as soon as he could speak. “CCrabbe . . .”
“He’s dead,” said Ron harshly.
Harry Potter and the Deathly Hallows - Chapter Thirty One
There is some speculation that Lavender Brown died as well, but it's far from conclusive.
To the best of my knowledge, the only characters from Harry's year that Rowling has confirmed to have survived the battle are Harry, Ron, Hermione, Neville, Hannah, and Draco. The other thirty-four may have died.
As the Dark Lord would like to point out, Harry technically died as well, (but seeing as this was only temporary, I decided not to count it.)