You are trying to print a null character, since yours char cdoes not need to be initialized. those. \0Interestingly, you cannot easily copy and paste this character, since most C codes perceive this as the end of a line marker.
I see ]when I run the code.
Try changing your code with
char c = '?';
gives me a conclusion
i = 0
c = [?]
One way to reproduce this problem is to run on unix
java Main | more
i = 0
c = [