Canned goods only stay good for a few years. Realistically after about 5-10 years they would still go bad (and that is really pushing them past their shelf life). MRE's, freeze dried food or food placed under nitrogen would last 50-100 years.
They would have to forage and hunt for food to survive which is feasible for the older children. The episode is a good story but in reality those children would have gone through a very traumatic experience and face all kinds of survival hardships such as no electricity, the elements, predators etc. that would not have been palatable to show on TV back then.