c - Output Of a While Loop -
how many times while loop executed in below prog if short int of 2 bytes?
main() { int j = 1; while(j <= 255); { printf("%d",j); j++; } return 0; }
i think should 255 times not correct. can tell me why?
you have semicolon @ end of while-line. while loop, consisting of statement ;
, executes "infinitely" many times.
Comments
Post a Comment