Rashak Mani said:But what if he was 6th level, died went to 5th level. He can still cast 3rd level spells, he would still understand the two spells he wrote down when he passed to 6th level. When he goes to 6th level again (2nd time) would he gain two more spells ?
What answer do you want?
The technical ruleslawyer answer that doesn't take multiple deaths into account, or the DM "Spirit of the rules" answer that does?