fork download
  1. #include <iostream>
  2. #include <iomanip>
  3. using namespace std;
  4.  
  5. int main() {
  6. unsigned long long i = 1234;
  7. auto str = "abcd";
  8. unsigned char uc = 0x0B;
  9. printf("%llu.", i);
  10. printf("Value: %p", str);
  11. printf("\n%0.2X\n", uc);
  12. std::ios state(nullptr);
  13. state.copyfmt(cout);
  14. cout << std::uppercase << std::hex << std::setw(2) << std::setfill('0') << (int)uc << endl << "A"<< endl << 11 << endl;
  15. //cout.copyfmt(std::ios(NULL));
  16. cout.copyfmt(state);
  17. cout << (int)uc << endl;
  18. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
1234.Value: 0x56526ec1eeea
0B
0B
A
B
11