Expanding my other question..
unsigned char* s_char = data + offset;
(*s_char) = size_t(((*s_char) & 0xf0)) | new_doff;
How to print s_char's bit representation?
Expanding my other question..
unsigned char* s_char = data + offset;
(*s_char) = size_t(((*s_char) & 0xf0)) | new_doff;
How to print s_char's bit representation?
You'll need to manually print it using something like:
printf("%d%d%d%d%d%d%d%d", *s_char & 0x80, *s_char & 0x40, ..., *s_char & 0x01);
I would use a type cast to int like
unsigned char* s_char = data + offset;
(*s_char) = size_t(((*s_char) & 0xf0)) | new_doff;
int s_char_int;
s_char_int = (int)s_char;
Then you can print it to the console or whatever else you want