reason for that o/p is ... coz range of short int is -32768 to 32767
and value of i start with i=0 and each time it will increment by 1 so corresponding value of i will be 1 2 3 . . . 32766 32767 -32768 -32767 . . . . -2 -1 but coz in printf u r using %u so it will print... 1 2 3 . . . 32766 32767 4294934528 4294934529 . . . . 4294967293 4294967294 4294967295 .... if u use %d then u get exact value of i in output also.... On Jun 5, 5:28 pm, sharad kumar <[email protected]> wrote: > @divya,which compiler u r using,i m getting this o/p on gcc compiler > > @mohit:loop stops at 4,294,967,295 in gcc -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
