I’m fairly new here so I'm sorry if this question is not suitable on this forum. I found pointer a little difficult to understand in . Pointer in C language is a variable that store the address of another variable.
Let’s start with a simple program to define a integer type variable and a pointer variable to store it’s address
pointer = & variable
pointer is storing address where variable value 20 is stored
I learn how to declare and initialize pointer in c. but I don't understand proper concept? I am looking someone's help to get grasp knowledge on pointer in c language.
Let’s start with a simple program to define a integer type variable and a pointer variable to store it’s address
Code:
int main()
{
/*declaration of integer variable*/
int variable = 20;
/*declaration of integer pointer*/
int *pointer;
/*assigning address of variable*/
pointer = & variable ;
return 0;
}
pointer = & variable
pointer is storing address where variable value 20 is stored
I learn how to declare and initialize pointer in c. but I don't understand proper concept? I am looking someone's help to get grasp knowledge on pointer in c language.