I will go through a few problems in specific.
I guess first do the declarations look right? Should I change something?

On this line im trying to set w to a blank string. Will this work?
strcpy(w, "");

Here I want to set the character k to the ith value of a string. The string is passed in and declared like this "char *str"
k = str[i];

In this little bit of code im just trying to store the value of w into a temporarry value. The problem i was having is all the other ways i tried if i changes w later in the code it would also change the temporary variable. I know there has to be a better way to do this
for(j = 0; j < strlen(w); j++)
tmpw[j] = w[j];

Here I want to put the character k onto the end of the string w. I dont think this works the way I did it but I dont know how to do it.
strcat(w, &k);

And finally here I want to set the value of the string w to the character k. I also dont think this is the right way to do this but i not sure how to.
strcpy(w, &k);