Did that mean you want to assign any number that can be stored in 3 bytes storage space? if so, I would suggest the following code. (I think if taken unsigned the maximum number would be 0xFFFFFF = 16777215 in decimal.) Providing a simple example. can not consider it perfect solution though.
unsigned char ch;
unsigned long int d;