kernighan ritchie example solutions