Hello , In C , I am looking for a way to convert a char string , for example (0580) (4*8 bits) into (0580) (4 * 4bits) , other example : (0FED) (4 * 8 bits) into (0FED) (4 * 4 bits). Thanks for your help.
sscanf() with %x will work for that task.
Thanks Ted , it works.
strtoul() is probably better - much smaller and with more appropriate error reporting.
For more complete information about compiler optimizations, see our Optimization Notice.