answersLogoWhite

0

A pointer is a variable, much like any other variable, but one that contains a value that is interpreted as a memory address. The variable is said to "point" at that address. In 32-bit systems, the variable is 4-bytes in length. In 64-bit systems it is 8-bytes in length. If the value is zero the pointer is said to be NULL -- it doesn't point anywhere. Any other value denotes the pointer is pointing at a memory location. The type of pointer determines how it treats the memory it is pointing at. For instance, an int pointer treats the memory location as if it contained an integer -- regardless of its actual type. We can access the memory location itself by using the indirection operator (-->). Providing the pointer is the correct type for the object stored in that memory, we can work with the object just as if we had a direct reference to the object.

Pointers are extremely powerful. By altering the value stored in the pointer, the pointer can be made to point at any memory location -- including other pointer variables, objects and values, even functions. Pointers also allow us to pass memory locations to functions, in much the same way as we can pass values to functions. And like all other primitives, we can use simple mathematics to adjust a pointer's value, such as increment and decrement, allowing the pointer to "roam" through a series of memory locations.

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

What is 'this pointer' in regards to computer programming?

It is a pointer which is pointing to present object with which the memberfunction is called in c++ language.


Does a computer mouse appear as a pointer or marker?

Pointer


What is a pointer in computer language?

A pointer is a variable whose value is the address to another variable. Pointers are most commonly used to dynamically allocate memory off of the heap instead of defining all of your variables at compile-time.


What is the pointer on the computer screen?

cursor


In which language pointer concept is not used?

Java


What is far pointer in c language?

its pointer created for high safety that cant be find by anyone.


Why does is used as a pointers in c language?

Let's suppose, you wanted to ask:Why thisis used as a pointer in C++ language? Because it is a pointer to the 'current object'.


Why does array index start with zero in C language?

Because of pointers and that all arrays are really pointers. A pointer something like *pointer can also be written as pointer[0] and *(pointer + 1) can also be written as pointer[1]


Why pointer can't be added in computer language C?

You can add a point in C/C++. The legal operations on a pointer are that you can 1.) add a constant, 2.) subtract a constant, and 3.) subtract two pointers that refer to the same array. Anything else is meaningless.


When would you use a pointer and a reference variable?

pointer: to access data by address reference: there is no reference in C language


What is a pointer on the computer screen?

A Curser, Maybe .. ?


What are the kinds of mouse pointer?

kinds of computer mouse?