There is no such thing as cyclic data type. Its just that every data type has limited size (1 byte for unsigned char).
1 byte = 8 bits When it is storing 255, its binary will be "11111111". When you increment it now, it tries to store "100000000", but since its limited to 8 bits, it becomes "00000000", which is 0. -Bharath On 4 August 2010 10:07, BABA SANUP @NITRKL <[email protected]> wrote: > so u want to say that char is also a cyclic data type as integers, then it > is perfect solution to the above riddle > > -- > You received this message because you are subscribed to the Google Groups > "google-codejam" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-code%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-code?hl=en. > -- You received this message because you are subscribed to the Google Groups "google-codejam" 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/google-code?hl=en.
