+ 6

can any one explain the use of pointers in a simple way?

24th Jun 2016, 9:50 AM
Sara ♡
Sara ♡ - avatar
3 Antworten
+ 6
There some causes: 1. Dynamic memory allocation(It's fast access to any object) 2. You can pass object by address to function 3. Fast access to arrays, lists and other data structures.
24th Jun 2016, 10:32 AM
Dmitry Pudov
Dmitry Pudov - avatar
+ 3
You can think of pointers as arrows that are "pointing" to a value stored in the memory (the value can be a variable, and object, some item store in an array, or anything stored in memory... even garbage...)... the pointer's value is the memory address where is pointing... if you know the memory address where something if stored then you can access it with a pointer... view it, change it, or even crash your computer ;-)
24th Jun 2016, 11:13 AM
Nelson Urbina
Nelson Urbina - avatar
- 1
pointer is simply "integer" type of variables which stores address of another variable..that's it
30th Jun 2016, 5:47 PM
Ñåđìm Şhäïkh
Ñåđìm Şhäïkh - avatar