EDIT 2: You have an array of pointers, I would use char * dictionary = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; char key[12]; //to copy the characters To use a single character we can do: key [1] = '\0'; //for loop key [0] = dictionary [i]; keep in mind that string key[52] is an **array of pointers**