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
difference between native and cross compilers
What is the difference between int main and void main?
How does normalization of huge pointer works?
Explain what is meant by 'bit masking'?
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?
Write a program to check armstrong number in c?
Is it possible to have a function as a parameter in another function?
Explain what is the benefit of using an enum rather than a #define constant?
Explain how can you avoid including a header more than once?
What is the size of structure pointer in c?
What is the translation phases used in c language?
Explain the meaning of keyword 'extern' in a function declaration.
regarding pointers concept
Explain the red-black trees?
Explain modulus operator. What are the restrictions of a modulus operator?