Exam 13: Dynamic Data Structures

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

The operation of removing a structure from a dynamically linked list is called a(n) ____.

Free
(Multiple Choice)
4.8/5
(42)
Correct Answer:
Verified

D

The function prototype for malloc() is contained in the stdio.h header file.

Free
(True/False)
4.8/5
(44)
Correct Answer:
Verified

False

The function call ____ requests enough memory to store 10 characters.

Free
(Multiple Choice)
4.9/5
(40)
Correct Answer:
Verified

D

The advantage to the calloc() function is that it initializes all newly allocated numeric memory to 0 and character allocated memory to NULL.

(True/False)
4.9/5
(49)

____ reserves the number of bytes requested by the argument passed to the function.

(Multiple Choice)
4.7/5
(39)

Placing a new item on top of the queue is formally referred to as ____.

(Multiple Choice)
4.8/5
(35)

All programming languages that support pointers provide a special pointer value, known as both NULL and ____, that acts as a sentinel or flag to indicate when the last structure has been processed.

(Multiple Choice)
4.8/5
(41)

____ changes the size of previously allocated memory to a new size.

(Multiple Choice)
4.9/5
(37)

The operation of placing a new structure on the top of a stack is called a ____.

(Multiple Choice)
4.9/5
(41)

In computer programming, stacks are used in all function calls to store and retrieve data input to and retrieved from the function, respectively.

(True/False)
4.8/5
(41)

The operation of adding a new structure to a dynamically linked list is called a(n) ____.

(Multiple Choice)
4.9/5
(40)

The expression t1.nextaddr->name is evaluated as ____.

(Multiple Choice)
4.9/5
(41)

A linked list provides a convenient method for maintaining a constantly changing list without the need to reorder and restructure the complete list continually.

(True/False)
4.7/5
(38)

Dynamic memory allocation is also known as ____ allocation.

(Multiple Choice)
4.9/5
(37)

The structure pointer operator is evaluated from left to right.

(True/False)
4.9/5
(32)

Structures that are "linked" together by including the address of the next structure in the structure immediately preceding it are known as ____ structures.

(Multiple Choice)
4.8/5
(37)

Each structure in a linked list has the same format.

(True/False)
4.8/5
(35)

The following function cycles through a linked list and displays its contents. Line 3 can be replaced with ____. 1 void display(struct myStruct *contents) 2 { 3 while (contents != NULL) 4 { 5 printf("%-30s\n",contents->name, contents->phoneNum); 6 contents = contents->nextaddr; 7 } 8 }

(Multiple Choice)
4.8/5
(40)

The following is an example of the creation of a(n) ____ in C. First = &t1; T1)nextaddr = &t2; T2)nextaddr = &t3; T3)nextaddr = NULL;

(Multiple Choice)
4.7/5
(42)

A stack requires a separate stack pointer that contains the address of the first structure added to the stack.

(True/False)
4.8/5
(37)
Showing 1 - 20 of 49
close modal

Filters

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