mirror of
https://gitlab.com/mfocko/CodeWars.git
synced 2024-11-22 08:33:48 +01:00
6 lines
192 B
C
6 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);
|
|
}
|