fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. char *str = "1234ABC890";
  5. unsigned int n;
  6. sscanf(str+3, "%4x", &n);
  7. printf("%x\n", n);
  8. return 0;
  9. }
  10.  
Success #stdin #stdout 0s 9432KB
stdin
Standard input is empty
stdout
4abc