Explanation

The correct answer to the question, "Didn't you know that it ------- who played the joke?" is "were we" (Option C).

In this context, the phrase "it were we" is a case of inversion, where the subject of the clause ("we") comes after the verb ("were"). This form is often used to indicate a hypothetical or subjunctive mood, implying a sense of surprise or disbelief about the identity of the joke-tellers. The speaker is emphasizing that they played the joke, possibly in a context where the listener assumed someone else was responsible.

Option A, "was us," is grammatically incorrect because "us" is an object pronoun, and subject pronouns are required in this construction. Option B, "were us," is also incorrect because "us" doesn't fit as the subject. Lastly, Option D, "was we," is incorrect because "was" does not agree in number with the plural subject "we."

Thus, "were we" captures both the correct grammatical structure and the intended nuance of the situation, making it the best choice to fill in the gap.