Connecting 5V to OUTPUT

Ok thanks for reply.

DVDdoug:
NO! You should never "short" (connect) an output pin to a power supply or ground. You should also never connect two outputs together. The output has to be "free" to switch high or low and it should never be "forced" high or low.

Of course, you CAN connect an input to +5V or ground.

And, it's OK to connect two inputs together although there's rarely a reason to do that unless it's inputs on two different devices.

Ok, thank you for reply can you check my problem with input in this topic ? ;] Why Input_pullup in arduino detecting state LOW - General Electronics - Arduino Forum