int bit1:1; above definition instructs compiler that use 1 bit for storing integer(signed by default) in bit1. Such notation is used for optimization of memory use.
So if someone stores 1 in bit1 then,it will be treated as -1 by compiler since we have instructed the compiler to store it in one bit and since in this case leftmost bit is 1 which will be treated as -1 by the system and output will be -1. -- 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.
