0
How can a pointer can be useful?
Why do we need to know the adress of a variable? How can this information help me? Thanks for helping !
1 Answer
+ 2
In C language we use Functions for code reusability..
in some situations we need to update the value of a variable in both main() function as well as in other functions.
so if suppose we does not use pointer variable then local variable scope ends whenever functions scope ends , so due to this we use pointer variable to update value at memory location.
also in dynamic memory allocation we allocate memory and it gets allocated randomly as per variable type for that reason pointer variables are necessary