How to compare arry

please help me

 char seach[]={'a','b','c','d'};
   char str_data[]={'a','b','d','c'};
    
     for (int z=0;z<4;z++) {
    
           Serial.println("str_data");
           Serial.println(str_data[z]);
           Serial.println("seach");
           Serial.println(seach[z]);
          
           if (str_data[i] != seach[i]){Serial.println("Arry not qual");}
           else { Serial.println("done equal \n");
        }
         

give result "Arry not qual" while first two element are same .
my expected result is
done equal
done equal
Arry not qual
Arry not qual

Please post code that compiles and provides the output that you posted

What is i?

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.