Which one of the following is not a possible state for a pointer.a)hol...
Explanation:
A pointer is a variable that holds the memory address of another variable or object. It allows us to indirectly access and manipulate the data stored in that memory address.
Possible States for a Pointer:
a) hold the address of the specific object: A pointer can hold the memory address of a specific object. This allows us to access and modify the data stored in that object through the pointer.
b) point one past the end of an object: Pointers can also point to the memory location just beyond the end of an object. This is useful when working with arrays or when iterating over memory blocks.
c) zero: A pointer can have the value of zero, which is also known as a null pointer. A null pointer does not point to any object or memory location. It is often used to indicate that a pointer is not currently pointing to a valid object.
Not a Possible State for a Pointer:
d) point to a type: Pointers do not point to a type itself. They point to the memory address of an object of that type. A pointer is declared with a specific type so that the compiler knows the size and properties of the object being pointed to.
For example, if we have an integer variable `num`, we can declare a pointer to it as `int* ptr = #`. Here, `ptr` holds the memory address of the `num` variable, allowing us to access and manipulate its value indirectly.
In summary, a pointer can hold the address of a specific object, point one past the end of an object, or be null. However, it does not point to a type itself.
Which one of the following is not a possible state for a pointer.a)hol...
A pointer can be in only 3 states a, b and c.