What is the usage of the pointer in C?

C Programming Language >   Pointer in C Language >   Pointer in C  

Long Question

2298


Answer:

  • Accessing array elements: Pointers are used in traversing through an array of integers and strings. The string is an array of characters which is terminated by a null character '\0'.
  • Dynamic memory allocation: Pointers are used in allocation and deallocation of memory during the execution of a program.
  • Call by Reference: The pointers are used to pass a reference of a variable to other function.
  • Data Structures like a tree, graph, linked list, etc.: The pointers are used to construct different data structures like tree, graph, linked list, etc.


This Particular section is dedicated to Question & Answer only. If you want learn more about C Programming Language. Then you can visit below links to get more depth on this subject.




Join Our telegram group to ask Questions

Click below button to join our groups.