Correct statistical test to compare pre and post questions (dummy variable)

#1
Hi friends,

What is the correct statistical test to compare a group who was tested in two points in time (pre and post) The same people.

I have a dummy question that was asked in pre and post test (exact the same question):
1=correct to the questions
0=incorrect

I want to see if there is any significant differences in participants' asnwers.

perhaps, ttest?? it is not matter that my variable is a dichotomous.

Thank you all in advance!

Cheers,
Marvin