$ ./guess_the_languageProgramming Languages
Programming Languages · medium · #609

Which programming language is this?

struct flags {
    unsigned int ready : 1;
    unsigned int error : 1;
    unsigned int mode  : 3;
};

struct flags f = {0};
f.mode = 5;

Answer: C

Bit-field members like unsigned int ready : 1; inside a struct and the struct flags f declaration are C.
Play Programming Languages ▸