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

Basic Data Types Quiz 1

Complete the form below ONLY if your Pseudonym begins with the Alphabetic Characters "N" through "Z" (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 int (in C/C++), is TRUE:

                        
 it is unsigned
                          it is always now always stored on 32-bits
                          it is always twice the value of a short
                          it is always half the value of a long
                          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

Question 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 = -20, y = 18; (in C/C++), and then x = x + y, How would the variable x appear in RAM?

                        
 0000000000000010
                          0000000000010100
                          1000000001100001
                          1111111111111000
                          1111111111111110

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:    If I were storing real numbers on 16-bits, and I allocated 5-bits to the characteristic of the exponent, what level of precision would I have?

                          2
                          3
                          4
                          5
                          6

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

                        
 indicates precision
                          indicates magnitude
                          requires 24-bits of storage
                          A and B
                          A and C

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 inconsistent
                          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 07/07/05.