0

Why pointer is require?

Hi programmers. As an example we have pointer named "*p" and variable named "a". We can access the value of variable by using it's name.so why we write "*p" instead of "a"?likewise we can access the address of "a" by using "&a".so what is necessary to use p=&a instead?

17th Apr 2019, 1:07 PM
Amir
Amir - avatar
2 Answers
0
a pointer is a variable that hold the address of another variable or another pointer itself, using pointer will give you direct access to memory and not just printing the address of a or accessing the value of a, and your code will be pretty fast
17th Apr 2019, 9:14 PM
✳AsterisK✳
✳AsterisK✳ - avatar
0
Thanks a lot I apologize for taking your time
18th Apr 2019, 3:49 PM
Amir
Amir - avatar