Converting integer to string in C without sprintf

后端 未结 5 2071
一向
一向 2020-12-17 03:56

It is possible to convert integer to string in C without sprintf?

5条回答
  •  抹茶落季
    2020-12-17 04:12

        int i = 24344; /*integer*/
        char *str = itoa(i); 
        /*allocates required memory and 
        then converts integer to string and the address of first byte of memory is returned to str pointer.*/
    

提交回复
热议问题