prog_avancee_C/TP4/union_ex3.c
2024-10-22 13:03:17 +02:00

16 lines
249 B
C

#include <stdio.h>
#include <stdlib.h>
void print_hex(int n);
int main(int argc, char *argv[])
{
print_hex(14*256 + 11*16 + 8); //0xeb8
print_hex(4*256 + 2*16 + 0); //0x420
return 0;
}
void print_hex(int n) {
printf("%x\n", n);
}