fork(1) download
  1. #include <cstdio>
  2. using namespace std;
  3.  
  4. int main() {
  5. int u, d;
  6. sscanf("-2", "%u", &u);
  7. sscanf("-2", "%d", &d);
  8. puts(u == d ? "u == d" : "u != d");
  9. printf("u: %u %d\n", u, u);
  10. printf("d: %u %d\n", d, d);
  11. return 0;
  12. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
u == d
u: 4294967294 -2
d: 4294967294 -2