+ 2
Any one explain pointer in c language
c
2 Réponses
+ 3
What exactly bothers you?
A lot of explanation is already given in the course and respecitve comments.
https://www.sololearn.com/learn/C/2933/
Short: A pointer is variable, which holds the address of another variable.
For example
int x = 3; \\ stored at memory location x034 for example
int* p = &x; \\ & gets the refernce = address of x, stored in p
\\ p points to x of type int
\\ the address of p itself is different again
This is useful to get at the starting point of an array for example, which is stored consecutively in memory.
0
>>Pointer is a special variable which is used to
store the address of another variable.
>>It is declared by using the operator * before
the name of variable.