Will heating up an object increase its mass? According to the $E=mc^2$ equation, will an object whose thermal energy (temperature) rises also weigh more? And by the same token, will the mass of an object decrease as its temperature approaches the absolute zero?
 A: All internal energy such as thermal, rotational, and internal potential energy contributes to the rest mass of an object. In fact, the vast majority of the mass of an atom is due to the internal energy between quarks that make up the nucleus rather than the rest mass of the quarks themselves.
So, yes, a hot object has greater rest mass and would weigh more when measured, if a scale were sensitive enough. Also, an object near absolute zero would also weigh less though, again, I don't know whether the difference is measurable in practical terms. 
A: Yes, when we heat an object its mass increases.
The complete equation is 
$$E^2=(pc)^2 + (mc^2)^2$$
And from this equation if a system has zero momentum (p=0), then it has energy 
$E=mc^2$
When you heat an object the molecules or atoms begin to vibrate, rotate with more kinetic energy.
But this doesnt increase the momentum of the system (the object is a system of many particles).
Though the kinetic energy of the particles that make the system increases,
 the system is at rest (when you heat the object the object doesn't start moving).
Hence, from the equation I wrote above the energy you provide get added as mass of object.
Another example:
A perfectly reflecting wall massless
box has mass when photons are randomly moving inside the box.
