Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

c convert number 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: #convert #number #string
ADD COMMENT
Topic
Name
5+2 =