Why output of Op-amp 741 is not high when i used in compared mode.?
If you want to use a cheap ancient part that actually will function on 0/5V, the LM393 is certainly a usable dual comparator. The 741 will not operate from +5V . Don't forget the output pullup if you use it. See below for comments on the input common-mode range.

It's inadvisable to use op-amps as comparators anyway unless you really analyze the situation- some of them behave very badly when (significant) differential voltage is applied. Another problem is that they're not designed to be saturated and have compensation for stability in op-amp use- recovery may take a very long time- 50usec or more in some cases. Also the output may not be compatible with logic (eg. the 741). And their output slew rate is glacial compared to a comparator. 

There is another problem however- the input common mode range of the LM393 extends only to 3V or 3.5V with a 5V supply. While you could source a device that is rail-to-rail input, it would be a better solution to divide down the input voltage to (say) half so your comparison takes place near 2.5V. This would allow many more options such as the antediluvian LM393, which is multi-sourced as well as being inexpensive- a true jellybean part. 

By the way, if you do this, an updated model to the PIC you are using  (PIC18F4520) has an internal comparator module that is similar in performance to the LM393 with a similar common mode range (Vdd-1.5V), so you may not need any external parts at all.. as a bonus, it's considerably cheaper.