Your cutKey array needs its own index - so you have
if(letterFoundSame == 0)
cutKey[cutKeyIndex++] = key[i];
then your 'go through all the letters so far' loop uses the cutKeyIndex (not i) as its limit.
You don't need an else in the test - just set to 0 before the inner loop then
if(key[i] == cutKey[x])
{
letterFoundSame = 1;
break;
}
otherwise you find a match, set the flag to 1, then keep looking at the next character, find no match, and set it back to 0.