answersLogoWhite

0


Best Answer

normal variable stores a value of the given datatype where

as the pointer variable stores the address of a variable.

for example int n=10;

int *p;

p=&n;

here p is a pointer variable and n is a normal

variable.p stores the address of n where as n stores an

integer value.

*p prints the value of n,p prints the address

of n.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between pointer variable and simple variable What are the advantages of pointer variable?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How accessing a pointer an a variable differs?

Pointer-variables are variables, so there is no difference.


What is the difference between structure and pointer?

A structure is a collection of primitives or other structures. A pointer is a memory address. Comparison of the two is like comparing bowling balls to cinder blocks. You can say that a structure defines the layout of the data, while a pointer points to data that is a particular structure.


What is pointer of pointer?

pointer is the variable that holds the address of another variable


What is the difference between value type parameters and reference type parameters?

When a variable is passed by value, the function receives a copy of the variable. When a variable is passed by reference, the function receives a reference, or pointer, to the original data.


Define pointer in C?

Pointer is a variable, A variable that stores the address of another variable. Size of a pointer is 2 bytes.


What is pointer why you use pointer?

Pointer is a variable that stores the address of another variable. Since pointer is also akind of variable, thus pointer itself will be stored at a different memory location.


In pointers what is the use of pointer variable?

Pointer is a variable that stores the address of another variable . So pointer basically stores the address of another variable and size of pointer can be evaluated by using sizeof operator.


What is a ponters in c-programming?

with the help of pointers we able to store the memory location of any variable. In c the pointer variable is use to store the memory location of any variable. The pointer variable is define as a simple variable but in pointer variable use a special "*" character at the left most side of name of pointer variable. If any variable name have * it means it is a pointer variable it hold the memory location of variable.


What is the difference bw function pointer and function of pointer?

function pointer is a variable that hold the address of any function which declared in the program but function pointer is the array of the function that accept the run time size of the function.


What is a pointer variable B?

pointer variable B holds base address of B


What does pointer holds?

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


Explain reference variable and how it is different from pointer variable?

In JAVA, all variables are reference variables, and there are no pointer variables. Even though the platform may implement them as pointers, they are not available as such. In C, no variables are reference variables. They are a C++ enhancement. In C++ a reference variable is syntactically the same as a pointer variable, except that the use of the indirection operator (*) is implicit. You do declare reference variables slightly differently than pointer variables but, once you do so, they can be treated as non-pointer variables. Reference variables also cannot be redefined once they have been initialized to point to some object. They are const. Structurally, there is no difference between a pointer variable and a reference variable. They are both still pointers. The compiler just makes it easier to treat reference variables and non-pointer variables the same way.