1. functions like IntToStr() and WordToStr() convert numbers into strings so to store that string, you need to declare a string first which, in C, is an array of characters.
2. These functions convert numbers into a string of fixed length and add spaces to the left if the number is small. you can get rid of those spaces using Ltrim()
try
Lcd_Out(2, 1, Ltrim(txt));
---------- Post added at 23:31 ---------- Previous post was at 23:28 ----------
if you have any confusions about the Library functions of mikroC, just double click the function name in the library manager. it will show you the detailed documentation of that function.