Study CPP Primer and write code for Exercise