Oh dear, that's a really tragic thought. In such an unfortunate event, the first priority would be to seek immediate help and notify the relevant authorities. Most institutions would immediately halt the exam to maintain the respect and dignity of the deceased student, and to manage the emotional well-being of the other students.