For example: "0" x123 string into hex 0 x123 also,
CodePudding user response:
Fyi:# include & lt; stdio.h>
Int main (void)
{
Char * STR="0 x123";
The int data;
Sscanf (STR, "% x", & amp; The data);
Printf (" % # x \ n ", data);
return 0;
}
CodePudding user response:
Fyi:# include & lt; stdio.h>
Int main (void)
{
Char * STR="0 x123";
The int data;
Sscanf (STR, "% x", & amp; The data);
Printf (" % # x \ n ", data);
return 0;
}