-2

I was looking at this exercise and it was mentioned that the string \x1AL\xD23k\xCA\x1D\xD7 consists of 8 bytes. However, I fail to see how there are 8 bytes in the string. Shouldn't there be 7 bytes instead since \x1A would represent 1 byte and any character without \x is a byte on its own?

Anders
  • 64,406
  • 24
  • 178
  • 215
Lew Wei Hao
  • 429
  • 5
  • 13

1 Answers1

0

\x1A,L,\xD2,3,k,\xCA,\x1D,\xD7. 8 bytes.

The convention is that \x is followed by exactly two characters base 16 that together denote the byte value. You might want to check out C escape sequeces.

Arminius
  • 43,922
  • 13
  • 140
  • 136