answersLogoWhite

0

A pointer is a variable used to store a memory address. That is, we can use a pointer variable to refer to another variable (including other pointers).

Although many variables within a program have names and can be referred to directly by those names, the majority of variables are anonymous; they have no names we can refer to. For instance, every variable declared on the heap is anonymous, every element of an array is anonymous and every node in a list is anonymous. Without pointers there would be no way to refer to these anonymous variables. Moreover, there would be no way to allocate objects on the heap without pointers.

Pointers also make it possible to pass addresses into functions. In C, for instance, all arguments to a function are passed by value, however a pointer's value is a memory address thus pointers allow us to use pass by reference semantics. This makes it possible for a function to refer to an object outwith the local scope of the function.

User Avatar

Wiki User

9y ago

What else can I help you with?

Related Questions

What is the Hebrew word for pointer?

A pointer, used in business or teaching = מַצבִּיעַ (matzbia)the specialty pointer used to read the torah = יד (yad)


What is the pointer used in bar mitzvah called?

Clarification is needed. The pointer used isn't specific to the Bar Mitzvah ceremony, it is the pointer used whenever the Torah scroll is read. The pointer itself is called a 'yad' which means 'hand'.


What is the pointer called that is used when reading the Torah?

The pointer that is used when reading the Torah is called a yad


Define pointer to pointer in c?

Double (**) is used to denote the double pointer. As we know the pointer stores the address of variable, Double pointer stores the address of any pointer variable. Declaration : int **ptr2Ptr;


Why is double pointer used?

Double pointer is a pointer to a pointer. So you can work with the double pointer as you work with a single one.Or you might mean 'pointer to double', eg:void clear_double (double *dp){*dp = 0;}


Can be used to draw a proposed tables size?

pencil pointer


Which type of Pointer control is used for people with limited hand movement?

hand pointer


What does pointer holds?

A pointer is used for pointing to a variable. It contains the address of the variable to which it points


How the pointer used in the linked list?

The pointer in linked list is used for traversing through the elements of the linked list. In a singly linked list, only a next pointer exits. So this pointer can be used for traversing only in one direction in the list. In case of a doubly linked list, a next and previous pointer exits. These pointers are used for traversing in both direction in the list.


WHAT IS POINTER TO POINTER IN C POINTER?

Pointer in C is Memory Reference. It stores memory address of any variable, constant, function or something you later use in your programming. Pointer basically used to ease the referencing of variables and others or in polymorphism and inheritance.


Difference between void pointer and null pointer?

A Null pointer has the value 0. void pointer is a generic pointer introduced by ANSI. Before ANSI, char pointers are used as generic pointer. Generic pointer can hold the address of any data type. Pointers point to a memory address, and data can be stored at that address.


Define pointer star?

Pointer Stars are stars that are used to pinpoint other areas in the sky, such as constellations.