I gave 12v supply to the 5v pin which made the arduino uno R3 to shut down. When I load it again it operated normally(only the Green and orange lights works) by when i tried to upload my program in the arduino it gave me a error message "avrdude: verification error, first mismatch at byte 0x000c0x0c != 0x0e
avrdude: verification error; content mismatch"
What board ?
Does it run the present sketch (or do you have none loaded) ?
Make sure you post enough detail for anyone to answer questions you have, or else they have to guess and helping you will not be possible.
Puting well over 5 volts to the 5 volt line will most likely destroy the processor as well as the USB chip and possibly also the regulator.
So be real sure of what you do if you decide to interface directly to the chip instead of to the power socket (in case there is one availble on your board).
The high voltage could have flipped a few bits or fuses around inside the chip or the USB controller. The chip may be ok but possibly would need to be flashed in a programmer.
Though it may be cheaper to just buy a pre-programmed chip. You'd need a 328 chip with an UNO bootloader.
You could use a 328 flashed as a Duemilanove but you'd have to set your board type to Duemilanove when uploading to it.