How did Alastor 'Mad Eye' Moody manage to survive for 9 months when he was trapped in the enchanted trunk in the 4th book?
Barty Crouch Jr had to keep Moody alive, since he needed a source of hair/etc for the Polyjuice potion. There is no canon explanation, but it would be relatively easy for Crouch to ensure that Moody was fed. Dropping food and water into the trunk is a relatively easy matter. Moody was helpless in that box (no wand, unable to attack physically and too weak to do anything anyway), so Crouch wouldn't have been afraid of Moody. So I see nothing stopping him from dropping food/water into the trunk every now and then.
Addendum: As mentioned in StarPilot's comment, Barty would have had to keep Moody around for questioning anyway. Polyjuice potion just makes you look like the subject, you still need to do a convincing impersonation by acting like him/her. Barty doesn't know all about Moody, he'd need to question him if something came up.
Besides, Moody, being the paranoid guy he was (as well as being an Auror), may have had spells that would activate when he died. Aurors did dangerous things, and were hated by many, it was quite reasonable for the Ministry to want to know about an Auror's death (If someone is on an Auror-killing spree, they should be able to stop him/her before it becomes a spree). Add Moody's paranoia to this and it's very likely that he had such spells on himself.
As far as I know, it hasn't be explicitly stated, but I believe the person being transformed into must be alive. All the instances of Polyjuice potion being used that I could find was between people who were still alive. Although that isn't evidence that you couldn't turn into someone who was dead, not that I could think of a reason to, or a part in HP where that would be beneficial.
It's also possible that he was kept alive because of the freshness of the ingredients or just in-case Crouch Jr ran out of "A bit of the person one wants to turn into."