How can I know if a pin is connected or not?

Hello,

I have a doubt.
How can I know if an input pin port is connected or not?

I know the microcontroller only recognized Zeros and Ones, but I need to know if a pin port is connected or not.

Thank you.

More questions in this forum