i have made the following differential amplifier but facing problem with this differential amplifier here i am expecting 7v i.e.(V2-V1) at output but only getting 4.999V .what is wrong here ?
There are a few things wrong here:
Your supply voltage is lower than your expected output voltage. An opamp can't create voltage, it gets it from the power rails. You need at least 7V on the power to get 7V out.
The 12V input is outside of the input range of the 741. The 741 expects the input voltage to be a couple of Volts below the power rail. Your 5V input is outside of the allowed input range as well.
The 741 can only drive its output to within a couple of Volts of the power rails. So, in this case the lowest output voltage is about 2V and the highest about 3V. A real 741 would not be capable of giving you a 5V output when powered on 5V. Your simulator isn't representing things accurately.
To make this circuit work properly, you should power it from -15V and +15V. That will give you an input and output range from -12V to +12V. Any input outside of that range will deliver an incorrect output. Any expected difference whose value is outside of that range will also cause an incorrect output.
Do not power the 741with more than +-15V. It is rated only to +-15V, and above that may be destroyed. Same rating applies to the inputs.