I generally have a mixture of things. I find the Sun Ripe fruit leather is really good for quick energy. I generally keep a mixture of raisins and chocolate chips for snacking. The chocolate provides the quick boost while the raisins provide more sustained energy. As Nomad says as well a big sandwich is important. I usually have something with cheese and cold cuts of some sort, while some veggies in there as well is good although they may not taste too good after being baked and smooshed for hours in the pack. Granola bars are great too. I get the Quaker harvest ones, not the chocolate covered ones. Too much sugar will cause your energy to go for a dive real quick. Also, I snack on banana chips, dried apricots, dried apples, or whatever dried fruit catches my fancy.
One thing that really helps is to snack continuously throughout the trip, and to start snacking before you actually get hungry. By the time you get hungry and your energy levels fall, it will take some time before the food raises your energy levels again. Also, drinking lots really helps keep exaustion down as well. When you drink, though, you should sip continuously rather than guzzle occasionally. Your body will make better use of the water rather than passing it right through right away. I find the water hydration packs with the straw are great for that since you always have the water accessible. I will easily go through 2 litres on a decent hike this way, but since I am sipping, I don't feel bloated at all.