Link to home
Start Free TrialLog in
Avatar of hyaku
hyaku

asked on

Substring in C ?

I want to do extract out the 1st character of the value.
char val_b = 1A;
char val_c = 3B
unsigned char b;
unsigned char c ;
The value 1 will be extracted from val_b and value 3 will be extracted from val_b.
My expected result should be b = 1, c = 3
How can i do it?
ASKER CERTIFIED SOLUTION
Avatar of Infinity08
Infinity08
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hyaku
hyaku

ASKER

Yup, case 2 is the one i'm looking for.
Thanks for the help again.
=)