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
If I have a char * variable pointing to the name of a function ..
What is assignment operator?
What is a const pointer in c?
What is a pointer on a pointer in c programming language?
What is the most efficient way to store flag values?
What are structural members?
What is structure data type in c?
Write a program to print numbers from 1 to 100 without using loop in c?
What is the difference between void main and main in c?
Are pointers integers in c?
What are high level languages like C and FORTRAN also known as?
Explain how can I write functions that take a variable number of arguments?
What is difference between far and near pointers?
What is "Hungarian Notation"?
write a c program to do the following: a) To find the area of a triangle. b) To convert the temperature from Fahrenheit to Celsius. c) To convert the time in hours : minutes : seconds to seconds.