+ 4

what is pointer in c programming?

13th May 2019, 6:10 PM
Sandeep kumar
Sandeep kumar - avatar
9 Respostas
+ 8
Pointer is a variable that hold address of memmory location of an another value .
15th May 2019, 1:25 PM
Vishnu
Vishnu - avatar
+ 6
Pointers scare a lot of beginneing C programmers, and even experienced programmers of other languages. but the the reason is just misunderstanding it. Why a pointer is called pointer? it points at something, a location in memory so the pointer is a variable that stores the address of another variable and not the value.
13th May 2019, 6:47 PM
Ahmed Jadani
Ahmed Jadani - avatar
+ 5
just like everyone have said, let me just add this little human made explanation which might be a little incorrect, pointer is like knowing the address to your friends home, you don't need to wait at the junction to get to your friend, you will just go over and knock on his door, and while you know the address you know your friend's family and can play with em, but if you have been waiting at the junction without knowing the address you won't enjoy that privilege, I hope this is cool
14th May 2019, 4:13 AM
✳AsterisK✳
✳AsterisK✳ - avatar
+ 3
your point is cool Kay/Nemo, i understand what you mean now
16th May 2019, 4:36 AM
✳AsterisK✳
✳AsterisK✳ - avatar
+ 2
To understand pointer in simple language: then pointers are also like variables but they store the address of another variable. They does not store any value, they just store address. Now, pointer stores address of that variable which it is pointing to. Consider # as a pointer $ as a variable so, #->$ This shows that # stores address of $. Pointers can be of any type like float, double, etc.
14th May 2019, 3:05 AM
Kamakshi Trivedi
+ 2
Pointers are just integers. That's it. There's literally nothing else to them. The compiler allows you to associate a type to them so it can verify your code is correct, but this isn't enforced at the assembly level. That's why they're both powerful and dangerous, like a chainsaw! VROOM!
14th May 2019, 7:07 PM
Nemo
+ 2
Kay/Nemo are you sure about that???
14th May 2019, 7:08 PM
✳AsterisK✳
✳AsterisK✳ - avatar
+ 1
I love how I got downvoted for sharing technical info. You guys go out and learn x86 assembly and come try again, eh?
16th May 2019, 4:10 AM
Nemo
0
About them being just ints in the assembly or them being like chainsaws?
14th May 2019, 7:09 PM
Nemo