There are two ways to find out :-
1. Yellow line : In case of CBC coaches, yellow line is painted at the ends of the coaches.
2. Absence of buffers : Buffers are anti-collision devices that are present at the ends of each coaches. In CBC, the coupler itself acts like a buffer.