# How \show must print null control sequence?

On p.46 of TeXbook it is said \csname\endcsname is the same as empty (aka null) control sequence.

But why they are printed differently by \show? Compare

\endlinechar=-1
\def\
{a}
\def\x{\
}
\show\x


versus

\endlinechar=-1
\def\
{a}
\def\x{\csname\endcsname}
\show\x


What are the rules here and which case deviates from them?

The rule you quote means that these two \show are showing the same csname token
\expandafter\show\csname\endcsname

In your case you are not showing the token with empty name but two different definitions of \x in the first case the replacement text of \x is the single csname with empty name, which \show shows as \csname\endcsname but the second definition has replacement text the two tokens \csname and \endcsname these have not been executed so as usual \show shows a space after both the names \csname \endcsname