The question is short.

unsigned char c = 1, d = 2; printf("%d %d %d",sizeof(c),sizeof(d),sizeof(c&d)); // выводит 1 1 4 

Tell me, why with conjunction the resulting expression becomes type int? The C99 standard clearly states that:

It has been given that it has been approved.

What is the reason? I would be grateful for the answer.

    1 answer 1

    So this is the action of the usual arithmetic conversions mentioned in your quote. Binary Specification & Clear Speak

    6.5.10 Bitwise AND operator
    3 The usual arithmetic conversions are performed on the operands.

    For integer types, the usual arithmetic conversions begin with integer promotions. In your case, it was integer promotions that worked and the unsigned char type was turned into int type.