You can connect an output to an input and it will work fine with or without a pull-up because the output is driven high or driven low. An output pin never "floats". You could use an SPDT switch and you wouldn't need a pull-up with that either.
Of course, there's no reason to do that unless you are connecting two different microcontrollers because the software always "knows" if the output is high or low and there's no reason to read it.
b) we connect them through LED and resistor ?
If "through" means in series, that won't work properly because an LED is a diode, and there's a voltage drop across the LED. With the pull-up the LED might light-up dimly depending on the polarity but it won't light at all with no pull-up because no current flows. So... connecting through the LED is "just wrong".
Of course you CAN connect an LED+resistor "as usual" and then connect an input pin in parallel.