codice:
#include <stdio.h>

char * lame_strtoi (int, int);

int main () {
    int x = 1024;
    char * s;
    s = lame_strtoi (x, 5); 
    fprintf (stdout, "%c - %c - %c - %c \n", * s, * (s + 1), * (s + 2), * (s + 3));
    free (s);
    return (0);
}

char * lame_strtoi (int a, int n) {
    char * p = (char *) malloc (n);
    sprintf (p, "%d", a);
    return (p);     
}