>Does this example even compile, given that ptr is not declared anywhere?
that comment was not a comment but an interview. and you just failed it.