Hello guys
I have difficulty to understand the pointers in C language. As far as I know a pointer is a variable whose value is the address of another variable
There are the two variables student and pointer.
I am declaring an integer variable student to store value 20 and I am declaring a pointer to store the address of integer variable student.
But we can do like this way also
When you write program when do you think that you should use the pointer in your code ?
I have difficulty to understand the pointers in C language. As far as I know a pointer is a variable whose value is the address of another variable
Code:
int student = 20;
int * pointer = &student ;
I am declaring an integer variable student to store value 20 and I am declaring a pointer to store the address of integer variable student.
But we can do like this way also
Code:
int student = 20;
int another_variable = &student ;