but on compiling it is giving the error
So you need to fix the error
even the cursor is not displaying on the lcd................
Does this surprise you? If the code does not compile, let me know, how do you expect the LCD to display anything?
main.c:140: error: expected declaration or statement at end of input
There's your answer. Fix the error. I have no idea what line 140 is, and since you've not formatted your
code, you've made it very difficult for people to help you, because it is difficult to inspect badly formatted code.
And, while I'm at it (I'm sorry, but you're asking for this), take a look at your code - doesn't it strike you as
rather silly that you've taken 60 lines or so to attempt to display a few characters on the screen?
I suggest you study C arrays. In fact, spend a day reading 'The C Programming Language'. It is an extremely
short book, and you will learn a few things from it that will make your code better. And, after a few lines,
you should have begun to suspect that a C compiler may have a simpler way to represent
numbers than in binary.