#include "string.h" char * itoa(char *p, unsigned x) { p += 3 * sizeof(int); *--p = 0; do { *--p = '0' + x % 10; x /= 10; } while (x); return p; }