ltoa in c

#include <stdio.h>
#include <stdlib.h>

int main() {
    long int num = 123456789;
    char buffer[20]; // Adjust the size according to the maximum length of the string

    ltoa(num, buffer, 10); // Convert long integer to string in base 10

    printf("Number as a string: %s\n", buffer);

    return 0;
}