The link field in the last node in a linked list has a special value stored in it. What is it? It has a special name. What is the special name? Why is this done?

What will be an ideal response?


The value is the null pointer. (Not the NULL pointer.) The null pointer value is used to signal the end of the linked list. It is obtained by assigning the value 0 to a pointer variable. When a pointer is assigned the value 0, the C++ type system converts the int value 0 to the implementation dependent value of the null pointer. C++ provides a special preprocessor symbol, NULL, which evaluates to the int value 0 for this use. In C, the value of NULL was an actual pointer value. In C++, the value of NULL is just 0. The bit pattern for the null pointer is not required to be all 0s.

Computer Science & Information Technology

You might also like to view...

Answer the following statements true (T) or false (F)

1. Any if-else-if statement can alternatively be coded as a nested if-else statement. 2. A series of deeply nested if-else statements is usually easier to follow than the logic of an if-else-if statement. 3. In order for an && expression to be true, only the expression on one side of the && operator needs to be true. 4. For an || expression to be true, the expression on the left side of the || operator must be false. 5. If the expression on the left side of the || operator is true, the expression on the right side is not checked.

Computer Science & Information Technology

The My Tasks folder in the Navigation Pane displays the To Do List link and Tasks folder.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

What does a join do? When is a join useful?

What will be an ideal response?

Computer Science & Information Technology

When you copy information from other sources such as a website, you should include a(n) ________ to credit the original source

Fill in the blank(s) with correct word

Computer Science & Information Technology