|
Algorithms_in_C
1.0.0
Set of algorithms implemented in C.
|
Convert a positive integer to string (non-standard function) representation. More...
#include <assert.h>#include <inttypes.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <time.h>Functions | |
| char * | int_to_string (uint16_t value, char *dest, int base) |
| Converts an integer value to a null-terminated string using the specified base and stores the result in the array given by str parameter. More... | |
| static void | test () |
| Test function. More... | |
| int | main () |
| Driver Code. | |
Convert a positive integer to string (non-standard function) representation.
| char* int_to_string | ( | uint16_t | value, |
| char * | dest, | ||
| int | base | ||
| ) |
Converts an integer value to a null-terminated string using the specified base and stores the result in the array given by str parameter.
| value | Value to be converted to a string. |
| dest | pointer to array in memory to store the resulting null-terminated string. |
| base | Numerical base used to represent the value as a string, between 2 and 16, where 10 means decimal base, 16 hexadecimal, 8 octal, and 2 binary. |
|
static |
Test function.
void