Quote:
Originally Posted by Mattso3000
Love this.
|
Quote:
Originally Posted by markem
Indeed. Left out the "\n" carriage return/line feed at the end of the quoted string. I'd mark it down too.
|
Quote:
Originally Posted by fencefixer
Carriage Return: CR \r 0x0D decimal 13
Line Feed: LF \n 0x0a decimal 10
 
|
Quote:
Originally Posted by markem
"The sequence \n in the string is C notation for the newline character, which when printed advances the terminal to the left margin of the next line." (Kernighan and Ritchie, "The C Programming Language" 1978, p. 7.
As someone who used to write terminal device drivers, I can assure you that advancing to the left margin of the next line encompasses (conceptually if not in fact) a line feed (vertical offset) and carriage return (horizontal offset).
Don't try to outgeek the computer science professor on this particular score. ASCII value != C implementation (which can vary based on device driver and OS).

|
Suddenly the picture doesn't seem funny anymore.