Arduino input and output

sreedevk:
Will my arduino be damaged if I define a digital pin on it as OUTPUT and then provide an INPUT of 5V to it.

Depends on whether the output is set HIGH or LOW.

If the output is HIGH then nothing happens. If it's LOW then any more than 40mA flowing is in the red zone.