fork download
  1. #include <stdio.h>
  2. #include <stdint.h>
  3.  
  4. int main(void) {
  5. // your code goes here
  6. uint32_t In = 506;
  7. uint32_t Out = 507;
  8. uint32_t BufLen = 1024;
  9. uint32_t txPendingOut = 506;
  10. uint32_t len = (txPendingOut - Out + BufLen) % BufLen;
  11. //uint32_t numChars = In - Out + BufLen;
  12. printf("%u", len);
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 5476KB
stdin
Standard input is empty
stdout
1023