paper 2, pseudocode and algorithms Flashcards

1
Q

What is a pointer?

A

A pointer is a variable which is capable of storing the initial address of the object of which it wants to point to.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the different types of pointers?

A
  1. Wild Pointer
  2. NULL Pointer
  3. Dangling Pointer
  4. Void Pointer
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the Wild Pointer?

A

Wild Pointers are pointers that are not initialized. The pointer may be initialized to a non-NULL value. Has no initial or end address

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the NULL Pointer?

A

A NULL Pointer is a pointer that points to nothing.

+ we can initialize a pointer variable when that pointer variable is not assigned any actual memory address

+ we can pass a null pointer to a function argument when we are not willing to pass any actual memory address

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the Dangling Pointer?

A

The Dangling Pointer is a pointer that points to a memory location that has been deleted.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a Void Pointer?

A

A Void Pointer is a pointer that is not allied with any data types. Also known as general-purpose pointer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly