Quiz Answer Labc Ex1 - Quiz Answer Labc Ex1 Fall 2013...

This preview shows page 1 out of 1 page.

Quiz Answer Labc Ex1 Fall 2013 Question 1 each section worth 2 points maximum 14 pts for this exercise a . Type Range Storage Required char -128 – 127 1 byte unsigned char 0 - 255 1 byte int -(2 31 ) – 2 31 - 1 4 bytes unsigned int 0 – 2 32 -1 4 bytes short -32768 – 32767 2 bytes unsigned short 0 - 65535 2 bytes long -(2 63 ) – 2 63 - 1 8 bytes unsigned long 0 – 2 64 -1 8 bytes float 4 bytes double 8 bytes b. A variable of type double c can represent the values –inf, inf and nan. Each number can have more than one representation in double so 0 can be a very small number.
Image of page 1

Unformatted text preview: Therefore x/0 is legal and is nan y = -nan y! = 1 If the data type of x is changed to int the division is illegal and a floating exception results. c. The answer is 12. d. it is possible when 0<<a and b is close to zero. e. x is not equals to y so the x!= y is true. the if (x=y) is an assignment which returns as a comparison the value of y. if y != 0 the comparison is true. If the coder whated to use in the second if the == operator, this error could be caught by compiling with the –Wall flag. What is printed? x!=y x=y...
View Full Document

  • Spring '14
  • Hasheep
  • bytes, Quiz Answer Labc

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern