fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main() {
  5. char str[256];
  6. int num = -12321;
  7. sprintf(str, "%d", num);
  8. sscanf(&str[(str[0] & '-') == '-'], "%d", &num);
  9. printf("%d\n", num);
  10. return 0;
  11. }
Success #stdin #stdout 0s 2156KB
stdin
Standard input is empty
stdout
12321