Capgemini interview question

Polymorphism Swapping with out a temporary variable