I have written a image on the usb by the win32diskimager,before I press write it said that writing to a physical drive may curropt the drive,i thought it may also not corrupt so i pressed write,after finishing my work with the usb,i format it but after formating the usb properties says 'usedspace-0 bytes freespace-256mb',how can a 2 gb flash drive change into 256 mb flash drive.?please help me how can i fix it ?is there any way to make it as like as before again ?
Use a low level format tool to format the USB disk, here is one that might be useful.
Either use a low level formatter utility as suggested by @cartman or else boot a Linux system and reformat the flash drive.
The problem you are experiencing is that somehow what you did changed the partitioning and/or the format of the drive. Microsoft has a bad habit of being very self centered in the formats they recognize. If the drive got repartitioned and or formatted in some strange way that is a non Microsoft supported way, Windows really can't see the extra space. Linux is much more forgiving - it will be able to see the rest of the drive even if it can't tell what the actual partition/format is. Under Linux you should be able to repartion/and or reformat it. A low level format utility - see if your particular drive manufacturer has one on their website - bypasses all of that and goes down to the hardware level and redoes everything in some default format - usually entire drive, FAT32 for compatibility.
Obviously, remember to backup whatever you have on the flash drive because either of these methods is destructive.