Semantic Analysis & Type Checking

Answer & solution
Answer: B, D (runtime nil dereference); as printed, A (compile-time error) also applies (no official key was published)
After new(ptr), assigning nil discards the usable pointer. Dereferencing ptr^ then attempts to access a nonexistent record, so a checked execution reports nil-pointer dereference rather than printing 5.2. This supports the intended runtime-error and nil-error choices B,D. Those issues can cause compile-time rejection before runtime. No claim that the literal program necessarily reaches the dereference is made.