#include #include void xisa() { // doesn't work char aux[10] = {'A', 'A', 'A', 'A', 'A'} ; if ('A' == aux[2]) printf("\n1st led"); } void xisb() { // doesn't work char aux[] = "BBBBBBB"; if ('B' == aux[2]) printf("\n2ndt led"); // 2nd led } void xisc() { // WORKS !!!! char aux[10]; aux[0] = 'C'; aux[1] = 'C'; aux[2] = 'C'; aux[3] = 'C'; aux[4] = 'C'; aux[0] = '\0'; if ('C' == aux[2]) printf("\n3rd led"); // 3rd led } void xisd() { // doesn't work char aux[10]; aux[0] = '\0'; strcat(aux, "DDDDDDDD"); if ('D' == aux[2]) printf("\n4th led"); //4th led } void main(){ /*************************************************** * I/O ***************************************************/ //outp(0xff,DDRB); // PORT B = OUTPUT //outp(0xff,PORTB); // WRITE PORT //PORTB = 0x00; // BLANKS PORT xisa(); xisb(); xisc(); xisd(); }