145 pts.
 where we have to use Pointer
hi I just want to know that where we have to use pointer??

Software/Hardware used:
ASKED: April 2, 2009  7:39 PM
UPDATED: January 30, 2010  6:12 AM

Answer Wiki:
A pointer is a memory variable that contains the address of another memory variable. They were widely used in older, procedural programming languages like C. Using pointers allowed programmers to write very fast, low-level code. But pointers also exposed some security risks that were difficult to identify when the programs were being written. Pointer use is allowed in C#, ----------------- There could be many situations in which you may need to use a pointer. Comes to mind the need to build a list of objects that needs to be able to grow without other limits than the available resources on the system. This can be done with a linked list, using pointers. If you use an array, you need to pre-define a maximum number of elements, and on the other hand, your program will always use the amount of memory needed to store all the elments of the array, whether it is full or not. As mentioned by Mr.Carlosdl, pointer is required whenever the program needs to use heap memory access using dynamic memory allocation (alloc/malloc/calloc/new). In addition to allocation of dynamic memory, pointer can also be used to access file descriptors.
Last Wiki Answer Submitted:  January 30, 2010  6:12 am  by  carlosdl   63,535 pts.
All Answer Wiki Contributors:  carlosdl   63,535 pts. , Mukul46   45 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _