The mock
test's answer is right, as innner classes shouldn't have extensions like (extends A ) or, it shouldn't have A as inner class as in Answer C.
You've mentioned the code compiled without error. While trying the code, where did you insert the answers?