Exam 13: Dynamic Data Structures

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

C provides the four functions, malloc(), calloc(), realloc(), and free() to control the dynamic allocation and release of memory space.

(True/False)
4.7/5
(42)

In making requests for dynamic memory allocation, it is extremely important to always check the return value; otherwise, the program will crash when a subsequent access to nonexistent memory is made.

(True/False)
4.8/5
(43)

Items are removed from a queue in the order in which they were entered.

(True/False)
4.8/5
(36)

Which of the following statements is correct with respect to the TeleType structure declaration? Struct TeleType { Char name[30]; Char phoneNum[15]; Struct TeleType *nextaddr; };

(Multiple Choice)
4.9/5
(35)

You should never forget to restore the allocated block of storage back to the operating system using free(); otherwise, the allocated storage will be lost until you reboot the computer.

(True/False)
4.8/5
(35)

The indirection operator in C is ____.

(Multiple Choice)
4.8/5
(43)

The expression *emp.ptPay is equivalent to the expression ____.

(Multiple Choice)
4.7/5
(34)

Deleting a structure in a linked list is essentially the reverse process of inserting a structure.

(True/False)
4.8/5
(40)

The dot operator has a lower precedence than the indirection operator.

(True/False)
4.9/5
(37)

____ reserves space for an array of n elements of the specified size.

(Multiple Choice)
4.9/5
(36)

The expression t1.nextaddr->name can be replaced by the equivalent expression ____.

(Multiple Choice)
4.8/5
(46)

The member operator is evaluated from right to left.

(True/False)
4.8/5
(38)

The structure pointer operator is ____.

(Multiple Choice)
4.7/5
(36)

A dynamically linked list permits adding or deleting a structure from anywhere within the list.

(True/False)
4.8/5
(30)

A queue is a LIFO structure.

(True/False)
4.9/5
(32)

In addition to an end-of-list sentinel value in a linked list, we must provide a special pointer for storing the address of the last structure in the list.

(True/False)
4.7/5
(40)

____ memory allocation makes it unnecessary to reserve a fixed amount of memory for a scalar, array, or structure variable in advance.

(Multiple Choice)
4.8/5
(42)

A ____ is a special type of linked list in which objects can only be added to and removed from the top of the list.

(Multiple Choice)
4.8/5
(37)

malloc() returns the address of the first reserved location, as an address of a void data type, or the program exits if sufficient memory is not available.

(True/False)
4.9/5
(33)

The operation of removing an item from a queue is formally referred to as serving.

(True/False)
4.8/5
(28)
Showing 21 - 40 of 49
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)