What are the advantages of a pointer in the C programming language?


Pointer has the following advantages :-

  1. Using pointers we can allocate memory dynamically to structures (Dynamic memory allocation).
  2. Arrays or strings can be passed to function more efficiently.
  3. Better memory management or our program will run faster.
  4. Pointer helps us to build complex data structures like linked lists, trees etc.
  5. Provides alternate way to access array elements of any dimension.
  6. Used to return more than one value from function.


© 2017