31 in dec = 0x1f in hexadecimal format. Hence,
char x[] = "blah\x1f" "blah";
The line is split into two so that the compiler does not read the escape sequence as 0x1fb (it should be read as 0x1f, which is 31 decimal). Alternatively, you can use the octal sequence:
char x[] = "blah\037blah";
source
share