mirror of
https://gitlab.com/mfocko/CodeWars.git
synced 2024-11-22 16:43:46 +01:00
7 lines
192 B
C
7 lines
192 B
C
|
#include <inttypes.h>
|
||
|
#include <stdio.h>
|
||
|
|
||
|
void uint32_to_ip(uint32_t ip, char *output) {
|
||
|
sprintf(output, "%d.%d.%d.%d", (ip >> 24) & 0xFF, (ip >> 16) & 0xFF, (ip >> 8) & 0xFF, ip & 0xFF);
|
||
|
}
|