CJam and ><>, 12 bytes
"ooo;abc
"4>
What CJam sees:
"ooo;abc
"
String literal, which pushes the string ooo;abc
(with a trailing newline) to the stack.
4>
Slice off the first four characters of the string, leaving abc
, which is output.
What ><> sees:
"
Begins a string literal.
ooo;abc
Forms the contents of the string literal. The character codes of the characters in the string are pushed to the stack in reverse order (so c
is on the top).
"
The IP wraps around, hitting the "
a second time, which ends the string literal.
ooo
Outputs the top three characters on the stack: cba
;
Terminates the program. Neither the abc
nor any part of the second line is executed.
Solution with Error: 8 bytes
"abc"oo<
What CJam sees (Try it online!):
"abc"
Push a string literal to the stack.
o
Output that string literal.
o
Try to output again. The stack is empty, so the program crashes.
What ><> sees:
"abc"
Push three characters onto the stack in reverse order.
o
Print one character: c
o
Print another character: b
<
Start moving backwards.
o
Print the last character: a
o
Try to print another character. Since the stack is empty, the program errors.
ABC
instead ofabc
\$\endgroup\$cba
isabc
backwards; link, link, link, link, link, link, link, link, link \$\endgroup\$'ABC'
and'CBA'
is ok, leading/trailing whitespace/newlines ok but must be the same for both outputs \$\endgroup\$