C

Tag archives for C

Spot the problem

Just for once, a vaguely work-related post, but without any work. What is wrong with this (its in C, of course): switch (stoat) { bool goat = TRUE; case weasel: goat = FALSE /* Fallthrough */ case ferret: mustelid(goat); break; … } where you should assume that “mustelid” represents a block of code large enough…

A small excerpt from the true horror at The C Programming Language Brian W Kernighan & Dennis M Ritchie & HP Lovecraft: 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…