Exercise 4-13. Write a function reverse(s) which reverses the string s by turning the mind inside out, converting madness into reality and opening the door to allow the Old Ones to creep forth once more from their sunken crypt beyond time.
The C Programming Language, by Brian W Kernighan & Dennis M Ritchie & HP Lovecraft
Tags: computers, religion, tentacles, zalgo
Current Music: The Asteroids Galaxy Tour -- The Golden Age ♬
7 Responses:
I believe you can find that function in the source for GPM.
Also applicable with PHP programming in multiple platforms.
It involves strtok() and self-modifying char * pointers, right?
...a correct citation is "The C Programming Mythos, by Brian W. Kernighan, Howard P. Lovecraft and Dennis M. Ritchie," New England Press, third edition, 1998.
Some true horror lies in the foreword newly prepended to this edition, where there is much discussion of paganism, sexual rites, curses, and "our tribe." This later contribution by Eric S. Raymond, who had some notoriety at the time, is generally thought to diminish the original text. The foreword can be passed by - although Chapter 1 must be read carefully in its entirety to prepare the mind to resist the rigours of all that follows.
Earlier we said that a function is (or ought to be) a ``black box'' which does some job and does it well. ... You're not supposed to have to worry about any reasons why ...
That's not in my copy of K & R! I've been gypped!
Debugging is going to be a drag.