Mark the letter A, B, C or D on your answer sheet to indicate the correct answer to each of the following questions.
Ann was very surprised to find the door unlocked. She remembered _______ it before she left.
A. to lock
B. having locked
C. to have locked
D. she locks