0
What is pointer in c?
how to use pointer in c?
2 Answers
+ 2
printf("thank you sarada");
+ 1
A pointer is a variable that stores the address of another variable. Unlike other variables that hold values of a certain type, pointer holds the address of a variable. For example, an integer variable holds (or you can say stores) an integer value, however an integer pointer holds the address of a integer variable.
Here is how we can declare pointers.
int* p;
Here, we have declared a pointer p of int type.
You can also declare pointers in these ways.
int *p1; int * p2;
Let's take another example of declaring pointers.
int* p1, p2;
Here, we have declared a pointer p1 and a normal variable p2.