• + 0 comments

    The descripency arises from em dash (–) in testcase 2 line 8. First we should know the difference between em dash (–) --long hyphen and en dash(-) -- hyphen available in ASCII set whereas "em dash"(which is 4 bytes wide) is not a part of ASCII set.

    "{line:2:1}" takes care of ASCII and Non-ASCII set characters and prints a printable character. whereas "cut -c 3 " just takes 3rd byte from binay representation of input file and prints it (even if it is non-printable). In the question we are asked to print ASCII character. So it is better to use cut instead of {line:2:1}.BTW I too did the same mistake :-)