The lto () function is used to convert a long data type to a string data type.
The syntax is as follows:
char *ltoa(long N, char *str, int base);Source:wal.wwutturi.com
Example:
/* Example: ltoa funciton in C language */ #include <stdio.h> #include <stdlib.h> int main() { long l = 12340; char str[33]; char * res; res = ltoa(l,str,10); printf("%s",res); return 0; }
output:
12340