#include "string.h" void itoa (char *buf, unsigned int n, int base) { unsigned int tmp; int i = 0, j; do { tmp = n % base; buf[i++] = (tmp < 10) ? (tmp + '0') : (tmp + 'A' - 10); } while (n /= base); buf[i--] = 0; for (j = 0; j < i; ++j, --i) { tmp = buf[j]; buf[j] = buf[i]; buf[i] = tmp; } } int strlen (char *s) { int i = 0; while (*s++) i++; return i; } char *strcpy(char *dest, char *src) { char *save = dest; while(*dest++ = *src++); return save; }