0 votes 0 votes What will be the output of following C program, if int takes 16 bits to store. Int a=60; printf(“%d”,~a); mohitbawankar asked Dec 5, 2017 mohitbawankar 392 views answer comment Share Follow See all 4 Comments See all 4 4 Comments reply Anu007 commented Dec 5, 2017 reply Follow Share find 2's complement of 60 , take 60 in 16 bits forms not 8 then do complement 0 votes 0 votes joshi_nitish commented Dec 5, 2017 reply Follow Share it will be -61. a = 60 = 0000.......0111100 ~a = 11111...111000011 in 2's complement 11111...111000011 represent -61 2 votes 2 votes mohitbawankar commented Dec 5, 2017 reply Follow Share -61 is right? 0 votes 0 votes Ashwin Kulkarni commented Dec 5, 2017 reply Follow Share Yes it will print compliment of 60. Which is 1111111111000011 = in 2's compliment it is -61. 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes The answer is -61. Rajnish Kumar 1 answered Dec 5, 2017 Rajnish Kumar 1 comment Share Follow See all 0 reply Please log in or register to add a comment.