Each carbon atom is capable of bonding to 4 elements. So,
HCCH is CH≡CH
CH₃CH₃ is CH₃ - CH₃
CH₂CH₂ is CH₂ = CH₂
The longest bond length is always the triple bond, then the double bond, and the shortest bond is the single bond. Therefore, the compound with the longest C-C bond is HCCH or CH≡CH.