Best Answer - Chosen by the Asker"Hardly" is an adverb, which modifies other words. The different position of "hardly" in the two sentences is because of the other words in the sentence that it modifies.
In the first it modifies "anything", emphasizing the very small amount gained.
In the second it modifies either or "ate", or perhaps the entire clause "ate anything", emphasizing more the process of eating very little than merely the quantity eaten.