How to Stop Analog Pin to float

so how could i know is sensor is connected or not. is any logic of method which tell us pin is floating.

No, there isn't.