itoa
itoa(数值,char *buf,进制);
# include <stdio.h> # include <stdlib.h> int main (void) { int num = 100; char str[25]; itoa(num, str, 10); printf("The number ‘num‘ is %d and the string ‘str‘ is %s. \n" ,num, str); return 0; }
时间: 2024-11-07 07:43:00
itoa(数值,char *buf,进制);
# include <stdio.h> # include <stdlib.h> int main (void) { int num = 100; char str[25]; itoa(num, str, 10); printf("The number ‘num‘ is %d and the string ‘str‘ is %s. \n" ,num, str); return 0; }