0 votes 0 votes applied gate test series What is the output of the following c-code[ Note: Assume integer as 2 bytes] ? #include<stdio.h> int main() { int x = 500; char *p=&x; *++p=2; printf(“%d”,x); return 0; } Programming in C programming test-series numerical-answers + – its_vaibhav asked Jan 12, 2022 its_vaibhav 594 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
2 votes 2 votes At the last x = 512 + 244 = 756 here 512 is upper nibble and 244 is lower nibble value Value change when we use a big-endian processor in place of a little-endian. Yaman Sahu answered Jan 12, 2022 Yaman Sahu comment Share Follow See all 5 Comments See all 5 5 Comments reply Show 2 previous comments raja11sep commented Jan 12, 2022 reply Follow Share What upper nibble lower nibble? Nibble means 4 bit 1 votes 1 votes Yaman Sahu commented Jan 12, 2022 reply Follow Share @raja11sep lower nibble means the lower address 1 votes 1 votes raja11sep commented Jan 12, 2022 reply Follow Share ok,,thanks 1 votes 1 votes Please log in or register to add a comment.