On page 46 of The TeXbook, there is
TEX deletes any space characters (number 32) that occur at the right end of an input line. Then it inserts a return character (number 13) at the right end of the line, except that it places nothing additional at the end of a line that you inserted with ‘I’ during error recovery. Note that return is considered to be an actual character that is part of the line; you can obtain special effects by changing its catcode.
For check whether TeX inserts a carriage return at the right end of lines, I code
but it produces
! Undefined control sequence.
What should I do to see it?