There are no "illegal" questions, as the law (federal or state) does not apply to the NRMP.
In terms of asking you about other specialties: this is common if they suspect you are applying to more than 1 specialty. There is no rule against it.
The most common misconception is that programs can't tell you anything about ranking. From the NRMP: The Match Participation Agreement permits program directors and applicants to express interest in each other but prohibits the solicitation of statements implying a commitment. However, some applicants may misinterpret statements of encouragement to signify a commitment on the part of the program and some programs may make misleading statements.
Statements such as the following have been made by program directors to applicants who later did not match to those programs:
"We plan to rank you very high on our list."
"We hope to have the opportunity to work with you in the coming year."
Such statements are not binding and frequently are misinterpreted, and applicants should not rely on them when creating their rank order lists.
Program directors, institutional officials, and medical school officials should avoid making misleading statements and at all times display a professional code of behavior in their interactions with applicants.
NOTE: The foregoing examples are illustrative only. They are not meant to be an exhaustive list of the types of activities that violate the NRMP's Match Participation Agreement. To review the terms and conditions of the Match Participation Agreement, please go to the NRMP's web site at
http://www.nrmp.org/
Standard employment interview question rules apply. No using race, ethnicity, gender, marital status, etc. to determine rankings. Of course, programs and naive interviewers do it all the time, but they aren't supposed to.