CSC 3501 Chapter : Quiz3
Document Summary
For each question, find the output of the given c code: hint 1: the size of data type char is 1 byte (i. e. , 8 bits). That is the same for data type unsigned char. Hint 2: %x is for printing integers in hexadecimal. char c = 0x81; unsigned char uc = c; printf("0x%x\n", uc); Answer: __0x_____________: hint 1: data types short and int have 2 bytes and 4 bytes respectively. In other words, there is an extension in the code below. Hint 2: %x is for printing integers in hexadecimal. short s = 0x9000; int i = s; printf("0x%x\n", i); Answer: __0x_____________: hint 1: uint_max is the maximum unsigned integer having 4 bytes (i. e. , Hint 2: %d is for printing signed integers in decimal. printf("%d\n", uint_max);