Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

c int to string

int numToConvert = *your number*;

 // calculate the length of the resulting string
int ENOUGH = malloc(sizeof(char)*(int)log10(numToConvert));
char str[ENOUGH];

sprintf(str, "%d", 42);

// str contains the number in string form
Source by stackhttps #
 
PREVIOUS NEXT
Tagged: #int #string
ADD COMMENT
Topic
Name
9+7 =