int decNum = 123456;
char hexNum[16];
// decimal number to hexadecimal numbersprintf_s(hexNum, 16, "%X", decNum);
printf("%d -> %s \n", decNum, hexNum);
// hexadecimal number to decimal numbersprintf_s(hexNum, 16, "FF");
decNum = (int)strtol(hexNum, nullptr, 16);
printf(" %s -> %d \n", hexNum, decNum);