In a thermodynamical process, pressure of a fixed mass of gas is changed in such a manner that the gas releases 20 J of heat and 8 J of work is done on the gas. If internal energy of the gas was 30 J, then the final internal energy will be
As △U=△Q−△W
therefore △U= (−20)−(−8)=−12J
△U=Uf−Ui=−12
Therefore Uf=−12+Ui=−12+30=18J