This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Else statement not working

I am using keil evaluation version. When i use debug for following program in keil, it skips the else part altogether. It goes to line 1,2 and then 7. Whats wrong with it.

1 a = 1;
2 if(a == 2){
3 a = 4;
4 }else{
5 a = 5;
6 }
7 while(1);

0