Why pointer is so important and when to use it ??

A pointer is just another kind of variable, used for holding another kind of information and you can perform operations on that information. There's no reason to think of it differently to how you think about an int, or a double, or a float, or anything else.

Why is an int important? Because it holds an integer number, and you use it when you need to store an integer.

Why is a pointer important? Because it holds a memory address, and you use it when you need to store a memory address.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.