Home / Questions / When should we use pointers in a C program?
Explanatory Question

When should we use pointers in a C program?

👁 2,017 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation

  • 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.