I have this number in hex string:
002A05.
I need to set 7-th bit of this number to 1, so after conversion I will get
022A05 >
int hex=0x002A05; int mask = 0x020000; printf ("%06X",hex | mask);
hope this helps