QUESTIONS AND CORRECT ANSWERS
How does a class differ from other data structures - CORRECT ANSWER Static value that uses
programs to manipulate data
How is an array stored in main memory - CORRECT ANSWER Stored in contiguous
sequential memory locations with the first element at the lowest address
How is a linked list stored in main memory? - CORRECT ANSWER Stored as an unordered
and noncontiguous set of list elements, each consisting of a data value and a pointer to the next data
list element.
What are the comparative advantages and disadvantages of an array and linked list - CORRECT
ANSWER Arrays are more compact and easier to read or write than linked list. Linked lists are
easier to update
Give examples of data that would be stored as an array - CORRECT ANSWER Any data item
that is of fixed length and seldom changes value (e.g., a customer name field)
Give examples of data that would be stored as a linked list - CORRECT ANSWER Data items
that are of variable length, large size, and which have frequent value changes (e.g., a process queue)
What are the differences between ASCII and Unicode? - CORRECT ANSWER ASCII is a
widely accepted standard approved by recognized standard setting agencies. Unicode is a coding table
that assigns nonnegative integers to represent printable characters. ASCII is a subset of unicode.
ASCII is used virtually everywhere else, either directly or as a subset of Unicode.
What is a data structure - CORRECT ANSWER Related group of primitive data elements
organized for some type of common processing and is defined and and manipulated in software
List several examples of common data structures - CORRECT ANSWER Array, Records,
Linked Lists
, What is an address - CORRECT ANSWER Location of a data element in a storage device. Vary
in content and representation, depending on the storage device being addressed
What is a pointer - CORRECT ANSWER Data element containing the address of another data
element
What purpose are addresses and pointers used for - CORRECT ANSWER Tie together parts of
a data structure such as a linked list or indexed file
What is excess notation - CORRECT ANSWER Format that can be used to represent signed
integers, always uses a fixed number of bits, with the left most bit representing the sign
What is Two- Complement Notations - CORRECT ANSWER Encodes positive values as
ordinary binary numbers and encodes negative values as the compliment of the corresponding positive
value plus 1.
Why are excess notation and two-complement notations needed - CORRECT
ANSWER Represents specific choices among accuracy, numeric range, size, and ease of
manipulation
What is overflow - CORRECT ANSWER condition that occurs when the output of an
instruction execution is too large in absolute value to store in a register.
What is an underflow - CORRECT ANSWER condition that occurs when the output of a
floating-point computation instruction overflows the exponent field.
How can the probability of of overflow and underflow occurrence be minimized? - CORRECT
ANSWER By allocating sufficient number of bit positions for data storage or by scaling input
values.
What is the numeric range of a 16-bit twos complement value? A 16-bit excess notation value? A 16-
bit unsigned binary value? - CORRECT ANSWER -(2n-1) to (2n-1 - 1), where n is the number
of bits used to store the value. The exponent is n-1 because 1 bit is used for the sign. Only 16 bits are
allocated to the whole portion of the value. Therefore, the largest possible whole value is 2^16