5. [16 points] For this problem, consider a hypothetical 10-bit machine that supports both signed and unsigned arithmeti
Posted: Mon Jul 11, 2022 9:55 am
statement. (a) [2 points] int a 288; char c = (char) a; int b = (int) c; printf("%d", b); Output: (b) [2 points] int a = 147; char c = (char) a; int b = (int) c; printf("%d", b); Output: (c) [2 points] int a 147; unsigned char c = (unsigned char) a; int b = (int) c; printf("%d", b); Output: (d) [2 points] char c= -7; int a = (int) c; unsigned b = (unsigned) a; printf("%u", b); Page Output: 8 of 10 C | ZOOM +
5. [16 points] For this problem, consider a hypothetical 10-bit machine that supports both signed and unsigned arithmetic. On this machine both int and unsigned are encoded using all 10 bits, while char and unsigned char are encoded using 5 bits. Assume as well that two's- complement encoding is used for the signed values. For each of the following code snippets, indicate what is printed out by the print f