0

Someone explainme behavior: char x='a'; a++;????

For example when same this char (x='a') is intro bucle for(int i=a;a<='z';a++){System.out.print(a++);} this print acegikmoqsuwy

6th Nov 2017, 1:56 AM
Miguel Mallqui
Miguel Mallqui - avatar
1 Answer
+ 3
Char are usually stored as 8bits integers of their ASCII value: increment it will add one to the ASCII code, so 'a'++ == 'b', 'b'++ == 'c', and so on...
6th Nov 2017, 2:51 AM
visph
visph - avatar