We just got back from a DC vacation about 2 weeks ago. Not being able to bring food and drinks to most attractions was definitely a budget buster. At the Smithsonians we visited, no one said anything about the snacks in our backpacks. We didn't have them out of the bags at any time but I'm sure the security guards saw the food. I got the idea that the enforced rule was food/drink in peoples hands. (However, we were prepared to throw out anything that kept us from getting in.)
Two things we did to save a little on drinks:
1. Brought empty water bottles in our backpacks and filled them up at the outside water fountains on the Mall.
2. On the Mall, near all the museums, are overpriced snack buildings (not the carts). They sell a souveneir cup (32 oz?) with drink that can be refilled for $2. The original price might have been $5-6. We carried that cup around a lot of days.
The food trucks parked all along the streets have bottled sodas and water for $2-3 and the cheapest food if you don't want to walk very far.