Here while loop will not work and it will go to infinite loop
Suppose you have enable interrupt which increment a global variable say 'index' in every second, then below conditional while loop will not work :
index=0; // it is incrementing every second by interrupt while(index > 0){ if(a>b){PORTB = 0xff;} }
loop work properly
index=0; // it is incrementing every second by interrupt while(index > 0){ PORTD=0; //any statement without any condition if(a>b){PORTB = 0xff;} }
Discussion (0)
No approved comments yet. Start a thoughtful discussion.
Sign in to comment.