Theory:

We have already learnt that when metals react with acids, they form salt and hydrogen gas.
 
Metal+DiluteacidSalt+Hydrogengas
 
Capture.JPG
The reaction of a metal with hydrochloric acid
  
Example:
 
Mgs+2HClaqMgCl2aq+H2g2Als+6HClaq2AlCl3aq+3H2gZns+2HClaqZnCl2aq+H2gFes+2HClaqFeCl2aq+H2g
 
Here, (s), (aq) and (g) refer solid, aqueous and gaseous state, respectively.
 
In case of copper, no bubbles will appear and the temperature will remain unchanged. This proves that copper does not react with dilute \(HCl\).
 
There is no hydrogen gas released when a metal reacts with nitric acid. It is because \(HNO_3\) is a powerful oxidising agent. By oxidising the \(H_2\) generated to water, it reduces itself to any of the nitrogen oxides (\(N_2O\), \(NO\), \(NO_2\)).
 
Furthermore, magnesium (\(Mg\)) and manganese (\(Mn\)) react with very dilute \(HNO_3\) to produce \(H_2\) gas. The reaction was also the highlyexothermic in this case. The reactivity decreases in the order \(Mg > Al > Zn > Fe\).
 
Metal+DiluteHNO3NoH2gasMg+DiluteHNO3H2gasMn+DiluteHNO3H2gasExothermicreaction
Metals such as gold and silver are known to be unreactive to both \(HCl\) and \(HNO_3\). Furthermore, the combination of these two acids form aquaregia, which can dissolve gold. It is a combination of hydrochloric acid and nitric acid mixed in the ratio of \(3:1\) respectively. It is a fuming yellow-orange that is highly corrosive. The chemical formula of aquaregia is 3\(HCl+HNO_3\).
Reference:
http://www.physics-chemistry-class.com/reaction-iron-hydrocloric-acid.jpg