Amazon Interview Question

How do virtual functions work?