Regarding Bit-Bit Operators in a sum operation

0

Hello, I have this part of the program and I would like to know why these assignments should be used, and only prints the variable b

int soma()
{
    int a,b,c;
    printf("Digite o numero que deseja somar\n");
    scanf("%d", &a);
    printf("Digite o segundo numero que deseja somar\n");
    scanf("%d", &b);
    while (a != 0) 
    {
        c = b & a;
        b = b ^ a;
        c = c << 1;
        a = c;
    }
    printf("Soma: %d\n",b);
}
    
asked by anonymous 26.06.2017 / 06:05

0 answers