Infinite loop 0,1,......255,0,1,................................................
Reason is you are declaring var as a unsigned char which gets 1B = 8 bits of memory and max unsigned value possible is 255
Rangle 0 to 255
whenver var = 255 = 1111 1111 then var + 1 is
1111 1111
+1
________
0000 0000 carry flag = 1
________
value is wrapped around :D