So I believe I messed up somewhere where I asked the user to input the last name of a person. I can input 1 name, and then it spits out the rest of the words. Can anyone help me?
Not really answering your question, but you do a lot of things in a way that isn't particularly efficient. variables of the same type can be stacked into the same statement, such as int i, j = 0, k;. A for loop iterator is best written with the end condition as i < numberCandidates as opposed to i <= numberCandidates - 1. As for your question, your names variable seems to be improperly implemented. Assuming you wanted an array of strings, you should either #include string.h and make it a string array, or if you can't use string, make it char* names[MAX];. I'm pretty sure you assign a char* with a string literal.