Contact: aviboots(AT)netvision.net.il
39,885 questions
51,811 answers
573 users
#include <stdio.h> struct S { unsigned int b : 3; // three-bit values are 0..7 }; int main(void) { struct S s = {6}; printf("%d\n", s.b); ++s.b; printf("%d\n", s.b); ++s.b; // overflow printf("%d\n", s.b); return 0; } /* run: 6 7 0 */