It depends on the type of logic circuit. TTL or LSTTL inputs go to a high logic level if disconnected. Modern CMOS circuits take just about no current so the input behaviour is unpredictable if disconnected.
It is generally a bad idea to leave logic input disconnected. Even if the corresponding output is not used, the current consumption of the circuit can change unexpectedly, and noise can be generated if the input voltage changes.
The voltage, and logic level, of an unconnected CMOS logic input can be affected by current leakage due to moisture, and pickup of electrical signals.