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 "D" through "M" (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 purpose of two’s compliment?

                        
 To increase (double) precision
                          That is just how the process of storing negative binary numbers works
                          to facilitate addition of binary numbers
                          To get rid of negative zeros
                          None of the above

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

                        
 000000001010111
                          100000001010111
                          100000000101000
                          111111110101001
                          111111110101000

Question 4:    f 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
                          1111111111111101

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 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/11/05.