Question: 1 2 Consider the following C code: #include int main() 3 { unsigned char M =-7%;B 4 5 printf(M in Decimal is: %d ,

1 2 Consider the following C code: #include int main() 3 {   

1 2 Consider the following C code: #include int main() 3 { unsigned char M =-7%;B 4 5 printf("M in Decimal is: %d ", M); 6 printf("M in Hexadecimal is: %x ", M); 7 8 char N =125%; 9 N = N + 5%;B 10 printf("N in Decimal is: 11 printf("N in Hexadecimal is: %d ", N); %x ", N); 12 13 return 0; 14 } The value of variable M is supposed to be -7 and of N is supposed to be 130. However the values of M and N are 249 and -126 respectively. Explain why? Go to Settings to activate Window

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!