Just Login
last year
Justcountry asked

What is a pointer?

Abhay Jajodia
Expert
last year
Abhay Jajodia answered

Good question! A pointer in C is essentially a variable that stores the memory address of another variable.

This means instead of holding a direct value (like an integer or a character), a pointer holds the location in memory of where that value is stored. For example, if you have an integer variable and you want to keep track of its memory address, you can use a pointer for that purpose. This is particularly useful for manipulating arrays, using dynamic memory allocation, and creating complex data structures like linked lists.

Hope this helps! Let me know if you have more questions.

C
This question was asked as part of the Learn C Programming course.