0 votes 0 votes Consider the following C program? The output of above program, when ‘short int take ‘2 B’ and character take 1 B to represent _________. (Assume memory storage follows Little Endian architecture). Abhinav Gupta asked Dec 15, 2017 • edited Dec 15, 2017 by Abhinav Gupta Abhinav Gupta 298 views answer comment Share Follow See 1 comment See all 1 1 comment reply Ashwin Kulkarni commented Dec 15, 2017 reply Follow Share Program is missing 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes Answer is -108. array c = 400 401 402 403 404 now array integer takes 2 Bytes each. Let starting address is 200, then array elements addresses are = 200 202 204 206 208. Now char pointer b points to array c. after 8 increments it will reach upto 208 (char increments by 1) Hence at address 208 => 404 is present. 404 = > 110010100 (Bcz pointer is character) In computer number is present in 2's compliment. hence 2's compliment value = -108. Ashwin Kulkarni answered Dec 15, 2017 Ashwin Kulkarni comment Share Follow See 1 comment See all 1 1 comment reply Abhinav Gupta commented Dec 23, 2017 reply Follow Share thats the solution given. 0 votes 0 votes Please log in or register to add a comment.