Check if pin is floating/disconnected/high-z?

johnwasser:
You could connect all of the input pins to a common rail with a 100K resistor each. If the pin follows the rail as you toggle the rail HIGH and LOW then the input pin is likely not connected to anything else. The resistors should be weak enough that they don't interfere with any actual inputs.

Hi John, it would be great if you can post schematic of how to achieve this? Apparently, i've been searching a solution for a long time and many sites/pages all refer to this response of yours. However, for new learners of electronics, your technical explanation is difficult to understand. So you if you can post a schematic with an example for 2 pins, that would help many of them who are seeking answers including myself. Thanks a lot.