Skip to main content
7 events
when toggle format what by license comment
Apr 8, 2014 at 17:31 comment added jpmc26 @xploreraj Relying on (char)0 to be printed is generally a bad idea. I believe it's the null character, which is not printable according to ASCII. (See en.wikipedia.org/wiki/Null_character: "it does nothing (some terminals, however, incorrectly display it as space)".)
Apr 8, 2014 at 14:10 comment added xploreraj OK. I am into it.
Apr 8, 2014 at 12:36 comment added SylvainD It doesn't work on my computer neither so there is an actual issue even if you cannot see it in your setup. The point is that the array should be filled with whitespaces and not '\0'. I've raised the issue, now I'll let you decide if you want to consider this as a problem.
Apr 8, 2014 at 12:32 comment added xploreraj Ideone may be is having problems with the '\0' character, and this can really vary across different consoles, but in Eclipse Juno, and CMD, its proper.
Apr 8, 2014 at 12:27 comment added SylvainD I have retried and I confirm it looks wrong : ideone.com/xYstrt
Apr 8, 2014 at 12:10 comment added xploreraj It works for "Hello Jack the Magnificient" because the character array will have length of 'Magnificient' as its the longest word and for other words, the remaining char array block will have default '\0' character which is not printed anyway. Please check. For second part, yes I agree, but just I'm able to leave trailing whitespace, I did that way.
Apr 8, 2014 at 10:51 history answered SylvainD CC BY-SA 3.0