CSC 3501 Chapter : Quiz3

13 views1 pages
15 Mar 2019
School
Course
Professor

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);

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents