ltoa
Syntax
void ltoa(long val, char s[], long base);
Function
The numbervalis converted to a strings. In this case,baseindicates a number base between 2 and 36. s must be large enough to accept the converted number!
Parameters
val Number to be converted.
s
String, which contains the converted number.
base
Number base.
Return Values
—
char s1[9];char s2[9];ltoa(z,s1,2);ltoa(z,s2,10);write("z: %d s1= %s",z, s1);write("z: %d s2= %s",z, s2);... Result: z: 255 s1= 11111111z: 255 s2= 255
atol