What was the purpose of the black codes?

A)To help African Americans adjust to life as free people

B)To ensure African American workers fulfilled their contracts

C)To control African Americans in a similar way to slavery