Gastric acid
The main constituent of gastric acid is hydrochloric acid which is produced by parietal cells (also called oxyntic cells) in the gastric glands in the stomach. Its secretion is a complex and relatively energetically expensive process. Parietal cells contain an extensive secretory network (called canaliculi) from which the hydrochloric acid is secreted into the lumen of the stomach. The pH of gastric acid is 1.5 to 3.5 in the human stomach lumen, the acidity being maintained by the proton pump H/K ATPase. The parietal cell releases bicarbonate into the bloodstream in the process, which causes a temporary rise of pH in the blood, known as an alkaline tide.
Citric acid
Citric acid is normally considered to be a tribasic acid, with pK values, extrapolated to zero ionic strength, of 5.21, 4.28 and 2.92 at 25 °C. The pKa of the hydroxyl group has been found, by means of C NMR spectroscopy, to be 14.4. 
The speciation diagram shows that solutions of citric acid are buffer solutions between about pH 2 and pH 8. In biological systems around pH 7, the two species present are the citrate ion and mono-hydrogen citrate ion. The SSC 20X hybridization buffer is an example in common use. Tables compiled for biochemical studies are available.