fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. signed char signedByte = 0xFF;
  6. cout << (int)signedByte << endl;
  7.  
  8. unsigned char unsignedByte = 0xFF;
  9. cout << (int)unsignedByte << endl;
  10. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
-1
255