请高手指导这是怎么回事
#include <iostream.h>#include <stdlib.h>
#include <stdio.h>
int main(void)
{
int number = 1234;
char string[4];
itoa(number, string, 10);
printf("integer = %d string = %s\n", number, string);
return 0;
}
结果:[bo]integer=1024 string=1234[/bo]
当我把a[4]改为a[5]时,有正确了
结果:[bo]integer=1234 string=1234[/bo]
请指教!