Puzzle #2 (based on N4296)
Wrong answer. Try again or show the answer.
#include <iostream>

struct B
{
  virtual void foo()
  {
    std::cout << "B";
  }
};

struct A : B
{
  virtual void foo() = 0;
};

void A::foo()
{
  std::cout << "A";
}

struct D : A
{
  void foo() override
  {
    std::cout << "D";
  }
};

int main()
{
  B b;
  D d;
  b.foo();
  d.foo();
}
With given code, pick one answer:
Guaranteed to print "AA"
Guaranteed to print "AB"
Guaranteed to print "AD"
Guaranteed to print "BA"
Guaranteed to print "BB"
Guaranteed to print "BD"
Guaranteed to print "DA"
Guaranteed to print "DB"
Guaranteed to print "DD"
Undefined bahaviour
Implementation defined
Will not compile