When treated with ozone followed by water, internal alkynes undergo oxidative cleavage to produce carboxylic acids. But when the terminal alkyne undergoes oxidative cleavage, the terminal side is converted into carbon dioxide.
The mechanism for this reaction is the same as the mechanism ozonolysis of alkenes.
Decades ago, this reaction was very important in organic chemistry because oxidative cleavage is used to help with structural determinations. An unknown alkyne would be treated with ozone followed by water, and the resulting carboxylic acids would be identified. This technique allowed chemists to identify the location of a triple bond in an unknown alkyne. However, the advent of spectroscopic methods has rendered this process obsolete as a tool for structural determination.