529 views

1 Answer

1 votes
1 votes

C1 memory representation :-1 0 0 0 0 0 0 0 (-128) In 8 Bits

-10 memory Representation:- 1 1 1 1 0 1 1 0     In 8 Bits

At Line no 3 we are doing addition operation for that c1 Firstly get promoted into integer type and the addition will happen

       1 0 0 0 0 0 0 0 (-128) 

       1 1 1 1 0 1 1 0  ( -10)

   + 0 1 1 1 0 1 1 0  (+118)

At compile time compiler will give an overflow warning.but it will run successfully.

Related questions

0 votes
0 votes
1 answer
3
Desert_Warrior asked May 16, 2016
4,153 views
#include<stdio.h int main() { int a[10][20][30] = {0}; a[5] = 2; return 0; }(a) printf("%d",*(((a+5)+2)+1));(b) printf("%d", *((a+5)+2)+1);(c) printf("%d",*(*(*(a+5)+2)...
3 votes
3 votes
0 answers
4