Thanks for your help friend.
I tried your code, but ended with the same results.
Today again I further narrowed the issue, and 5 mins back I got the results. The isssue was with LCD, it was defective, I replaced it and now all the characters are getting printed.
Thanks for your help.