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
how to count no of words,characters,lines in a paragraph.
What is scanf_s in c?
What are # preprocessor operator in c?
Define Spanning-Tree Protocol (STP)
WRITE A PROGRAM TO MERGE TWO SORTED ARRAY USING MERGE SORT TECHNIQUE..
What are structure members?
What are the benefits of c language?
What is a macro?
Differentiate between calloc and malloc.
What are the different types of errors?
What does p mean in physics?
Which is best linux os?
How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?
What is a far pointer in c?
Does c have enums?