K&R solutions