CHAPTER 13

image

Fun, Fun, and More Fun

How does a project get to be a year late? One day at a time.

—Frederick P. Brooks, Jr., The Mythical Man-Month

As we conclude the basic introduction to C++ and prepare to tackle more-advanced topics, perhaps it might be fitting to reward our efforts with a slight diversion. We’ll look at some fun interview questions with programmatic C++ solutions.

Dropping Light Bulbs

There’s an interview question floating around on the Internet1 that asks you to determine how far a superstrong light bulb can drop without breaking. We’ll break down this program mathematically and implement a nice recursive algorithm to show ...

Get C++ 2013 for C# Developers,Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.