what is pointer ? what is the use of pointer?

Answer Posted / gouse mohiddin

A Pointer is a variable which holds the memory address of
the another variable
pointers are used to save and find the memory address of
the another variable.
The syntax is as shown below. You start by specifying the
type of data stored in the location identified by the
pointer. The asterisk tells the compiler that you are
creating a pointer variable. Finally you give the name of
the variable.
type * variable name

Example:

int *ptr;
float *string;
Address operator:

Once we declare a pointer variable we must point it to
something we can do this by assigning to the pointer the
address of the variable you want to point as in the
following example:

ptr=#

This places the address where num is stores into the
variable ptr. If num is stored in memory 21260 address then
the variable ptr has the value 21260.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

difference between native and cross compilers

1671


What is the difference between int main and void main?

573


How does normalization of huge pointer works?

637


Explain what is meant by 'bit masking'?

644


Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?

2055






Write a program to check armstrong number in c?

635


Is it possible to have a function as a parameter in another function?

599


Explain what is the benefit of using an enum rather than a #define constant?

722


Explain how can you avoid including a header more than once?

601


What is the size of structure pointer in c?

614


What is the translation phases used in c language?

635


Explain the meaning of keyword 'extern' in a function declaration.

722


regarding pointers concept

1572


Explain the red-black trees?

607


Explain modulus operator. What are the restrictions of a modulus operator?

600