I have a Schengen visa issued from German consulate and my first entry and main entry country will be Germany. In my application form, I mentioned that I will visit Italy, too. However, I have changed my plans and I intend to go to Hungary instead of Italy. Is the exit country will be a problem for me? I mean is it possible that exit stamp from Hungary will be a problem in my future Schengen applications?
It's very unlikely to be a problem. Importantly, your visa is perfectly valid for Hungary too. Showing up somewhere completely different and not going to the country that issued the visa might be a problem (see Should my first trip be to the country which issued my Schengen Visa? and Can I use my Schengen visa for a completely different purpose and entry point?) but if you went to Germany on a German visa and did not overstay, I doubt any consulate would care about the point of exit.