Copy/paste ex11.c code from github branch ex10