[interfacekit] HELP!


Hi!



I encountered this sample and I can't understand what it does! I searched(my archive of C books) but found no references to something like this, so PLEASE help me understand what this means and what happens here...


#include<stdio.h>

struct test{

unsigned a:1, b:2, c:3;

};

void main(){

struct test x;

x.a = x.b = x.c = 7;

printf("%d %d %d\t", x.a, x.b, x.c);

x.c = x.a = x.b = 7;

printf("%d %d %d", x.a, x.b, x.c);

}

The result is: 1 3 7 1 3 1.

What's the meaning of: a:1, b:2, c:3 ?


Thank you, Adi.



---------------------------------------------------------------
Cauta-ti perechea pe http://dating.acasa.ro


Other related posts: