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
Write a C program on Centralized OLTP, Decentralized OLTP using locking mechanism, Semaphore using locking mechanism, Shared memory, message queues, channel of communication, sockets and a simple program on Saving bank application program using OLTP in IPC?
What header files do I need in order to define the standard library functions I use?
What is the purpose of realloc()?
Explain the difference between structs and unions in c?
In which header file is the null macro defined?
how to make a scientific calculater ?
Can we replace the struct function in tree syntax with a union?
Is main is user defined function?
What is use of #include in c?
What is wrong with this program statement?
How do you print an address?
What are formal parameters?
What are the different types of objects used in c?
What is a c token and types of c tokens?
What is a program flowchart?