What is the use of Pointers in C ?
Use of Pointers :-
1 . Accessing array of elements.
2 . Passing arguments to functions by reference.
3 . Passing arrays and string to functions.
4 . Creating data structures such as linked list,tree,graphs and so on.
5 . Obtaining memory from the system dynamically to create dynamic array.
6 . Program using pointer runs faster due to direct dealing with memory.
Thus pointer provide flexibility in programming.
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment