Both are correct. The process is somewhat more complicated (as mentioned by Borek) because it involves the following equilibria:
CO32- + H+ <--> HCO3-
HCO3- + H+ <--> H2CO3
H2CO3 <--> H2O + CO2
Since CO2 is a gas, it will escape, driving the equilibrium toward the production of CO2 and H2 in the presence of excess acid. However, when acid is the limiting reagent, you will need to consider the production of bicarbonate and carbonic acid in addition to CO2