调用_itoa函数时发生了很奇怪的现象,说明一下,我学C不过两个礼拜,不过现在的我编着编着就疯了,问题难免会很多,希望你们能。我始终坚信“当坚持成了一种习惯,那
程序代码:
/* 二进制 的十六进制的求法 */ #include < stdio.h > #include < stdlib.h > void main ( ) { char temp[20]; int i; scanf ( "%d ", &i); _itoa ( i, temp, 2 ); printf ( "Integer %d after convert in base2:%s\n", i, temp );//二进制 _itoa ( i, temp, 10 ); printf ( "Integer %d after convert in base10:%s\n", i, temp );//十进制 _itoa ( i, temp, 16 ); printf ( "Integer %d after convert in base16:0x%s\n", i, temp );//十六进制 system ( "pause" ); }