I've written a for loop that searches a string in another. I want it to rename it's position when it finds it. ( I am open for new suggestions for the search :) )
int search (char str1[56], char str2[5]){
    int c1, c2, c3, c4;
    c1 = 0;
    for (c1=0; c1<56; c1++)
    {
        c2 = 0, c3 = 0;
        for (c2 = 0; c2 < 5; c2++){
            if (str1[c1] == str2[c2]){
                c3++;
            }
        }
        if (c3 == 5){
            c4 = c1; 
            break;
        }
    }
    return c4;
}