On Cover says, "When making a melee attack against a target that isn’t adjacent to you (such as with a reach weapon), use the rules for determining cover from ranged attacks." That's done by doing this:
To determine whether your target has cover from your ranged attack, choose a corner of your square. If any line from this corner to any corner of the target’s square passes through a square or border that blocks line of effect or provides cover, or through a square occupied by a creature, the target has cover (+4 to AC).
Also, on Cover and Attacks of Opportunity says, "You can’t execute an attack of opportunity against an opponent with cover relative to you."
However, Moving through a Square says, "You can move through a square occupied by a friendly character, unless you are charging. When you move through a square occupied by a friendly character, that character doesn’t provide you with cover" (emphasis mine).
Thus, in the scenario described in the question, when C takes a move action to move into his ally B's square, A can't make an attack of opportunity against C because the attack of opportunity would've been provoked from the square C just left, and C has soft cover from A in that square. However, when C exits B's square (as he typically must), if C exits into a space that that A still threatens, C will provoke attacks of opportunity normally as C being in the square with B doesn't provide either of them with cover.