Three address code is either a linearised representation of Syntax tree or DAG.
In 3AC, At most there can be three addresses. An address can be a name, a constant and a compiler generated temporary name.
In this video, for every possible programming language statement, Equivalent three address code is discussed.