When should we use pointers in a C program?

Long Answer
Views 1941

Answer:

  • To get address of a variable
  • For achieving pass by reference in C: Pointers allow different functions to share and modify their local variables.
  • To pass large structures so that complete copy of the structure can be avoided.
  • To implement “linked” data structures like linked lists and binary trees.

Related Articles:

This section is dedicated exclusively to Questions & Answers. For an in-depth exploration of C Programming Language, click the links and dive deeper into this subject.

Join Our telegram group to ask Questions

Click below button to join our groups.