Auto scan removable media?

Does Avast 4.7 has features auto scan pendrive once i plugged my pendrive to my computer?

When you access (not just plug) avast will scan the boot sector and, depending on your scanner sensibility, the files and folders when you access them (read).
If you want a particular scan, you’ll have to edit the autoexec.ini file in the pendrive, for instance, using: http://www.net-burner.com/WhatIs/Index.cfm
and then using ashQuick.exe of avast folder.

The avast quick scanner (ashquick.exe) could be used in a link of your desktop to scan the pendrive.

But, as you’ve asked directly, there isn’t an automated scan when you plug a pendrive…

once i plugged my pendrive to my friend’s pc with karpersky installed,it immediately detected an virus,but avast does not.

avast! indeed does not have a feature to autoscan the whole drive when it’s mounted. However, I think the current resident shield provides enough protection - the malware would be detected and stopped once you tried to activate it. (Depending on the sensitivity of your Standard Shield, maybe also when you try to copy it from the drive to your disk.)