fork(4) download
  1. #include <iostream>
  2.  
  3. int main() {
  4.  
  5. char test[] = "Hellóóóó"; // test[10] won't compile. Use test[13] or just test[]
  6.  
  7. std::cout << "The string " << test << " consists of " << sizeof test << " bytes: ";
  8. for(std::size_t n = 0; n < sizeof test; ++n)
  9. std::cout << std::hex << +(unsigned char)test[n] << ' ';
  10.  
  11. std::cout << '\n';
  12. }
  13.  
Success #stdin #stdout 0.01s 2680KB
stdin
Standard input is empty
stdout
The string Hellóóóó consists of 13 bytes: 48 65 6c 6c c3 b3 c3 b3 c3 b3 c3 b3 0