Please i want to understand pointers concept more clearly. | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 2

Please i want to understand pointers concept more clearly.

I learnt that the reference operator (*) and the pointer are different.

22nd Apr 2020, 1:30 AM
Khevlar
Khevlar - avatar
2 ответов
+ 4
Hiiiiii, let see it , int *p; int a=5; *p=&a; Here we assigned address of a to the pointer p , then it points on value of a (var) and stores address of a(var). Since the pointer have address it takes less time to execute, then let's see how value are changed Let *p=10 , Then as it points on a then the value of also becomes 10 a=10 ......... If you have specific questions regarding this please ask ..........
22nd Apr 2020, 2:50 AM
Raj Kalash Tiwari
Raj Kalash Tiwari - avatar
0
To understand pointers more clearly, you need to learn about the structure of a program. I.e. stacks and heaps.
22nd Apr 2020, 8:53 PM
Logomonic Learning
Logomonic Learning - avatar