Variable Addition in C Language

Posted by pavun_cool on Stack Overflow See other posts from Stack Overflow or by pavun_cool
Published on 2010-04-10T08:06:55Z Indexed on 2010/04/10 8:13 UTC
Read the original article Hit count: 186

Filed under:

Hi all,

main()
{
        char a,b,c;
        a=6;
        b=-5;
        c = a+b ;
        printf ("%d %d %d \n" , a, b,c ) ;
}
Here , what actually happens 

00000110
10000101 
--------
10000111
--------
So values c will -11 , then how come it is 1. 

© Stack Overflow or respective owner

Related posts about c