wpe41.gif (23084 bytes)CIS3355: Business Data Structures
Fall, 2008
 

Basic Data Types Quiz 2

Complete the form below ONLY if your Pseudonym begins with a Non-Alphabetic Character (e.g., "0", "&") or the Alphabetic Characters "A" through "C" (uppercase or lower Case)

If you choose this Quiz and you do not meet the criteria above, you will receive a zero (0)

Enter Your PSEUDONYM:          

Question 1:    Which of the following about the data type short (in C/C++), is TRUE:

                       
 it is unsigned
                          it is stored on 32-bits
                          it is an integer
                          takes on values from -2^32 to +2^32 - 1
                          Trick question: All are FALSE

Question 2:   What is the difference between one’s compliment and two’s compliment?

                       
 In two’s compliment, we add a 1 to a one’s complimented number
                          The complimented number is doubled in two’s compliment
                          We compliment twice in two’s compliment
                          In two’s compliment, we add one and then compliment
                          None of the above

IQuestion 3:    The one's compliment of 87 (stored as a short) is

                       
 000000001010111
                          100000001010111
                          100000000101000
                          111111110101001
                          111111110101000

Question 4:    If I made the statement: short x = -97; (in C/C++), How would the variable x appear in RAM?

                        
 1111111110011111
                         1111111111100000
                          1000000001100001
                          1111111111101011
                          1111111111101100

Question 5:    Which of the following about the data type float (in C/C++), is FALSE:

                       
 it is always signed
                          the characteristic of the exponent indicates where the decimal point should go
                          the characteristic requires 7-bits of storage
                          it requires the same storage as an int (in today’s MS/Visual C++)
                          Trick question: All are TRUE

Question 6:   The three components of a real number (float) are

                       
 sign, characteristic of the exponent, mantissa
                          sign, integer equivalent, decimal point
                          sign, characteristic of the exponent, decimal point
                          sign, characteristic of the exponent, integer equivalent
                          sign, mantissa, decimal point

Question 7:    How many decimal points of precision are available for the data type float (in C/C++)??

                       
 7
                          10
                          24
                          64
                          128

Question 8:    Which of the following statements about the characteristic of the exponent is TRUE?

                       
 indicates precision
                          indicates magnitude
                          stores the real number
                          requires 16-bits of storage
                          requires 24-bits of storage

Question 9:   Why do we refer to real numbers (floats) in terms of level of precision?

                       
 due to the number of bits involved, the range of real number values is to large
                          magnitude tends to be inconsisten
                          the range of real numbers makes no sense
                          the level of precision indicates what the magnitude will be
                          precision indicates where the decimal point will be placed

Question 10What level of precision do I have with the ANSI C/C++ data type double?

                       
 7 or 8
                          At Least 10
                          at least double that of a float
                          14 to 16
                          none of the above
 

This page was last updated on 01/30/05.