If the metal in the above reaction displaces hydrogen from the acids then it is seen as hydrogen gas. The metal combines with the remaining part of the acid and forms a compound called a salt. Thus, the reaction of a metal with an acid can be summarised as:
Metal + Acid ⟶ Metal Salt + Hydrogen gas
Thus, instead of dilute sulphuric acid if dilute hydrochloric acid is taken then almost the same amount of gas will be evolved.