Because you’re passing the value of the pointer to the method and then dereferencing it to get the integer that is pointed to.
More Related Contents:
- What is pointer to string in C?
- What is the output of the following code in C? [closed]
- Incorrect result in c code
- whats the difference between dynamic memory allocation and normal memory allocation?
- pointer to string concept in c [closed]
- Pointer manipulation inside function
- C: differences between char pointer and array [duplicate]
- “Pointer from integer/integer from pointer without a cast” issues
- Are there any platforms where pointers to different types have different sizes?
- What exactly is the array name in c?
- Does free(ptr) where ptr is NULL corrupt memory?
- How to pass a 2D array by pointer in C?
- Pointer to pointer of structs indexing out of bounds(?) when I try to index anything other than zero
- Should I use char** argv or char* argv[]?
- Passing an array by reference in C?
- Addresses of two char pointers to different string literals are same
- Difference between char* and const char*?
- In C, what is the correct syntax for declaring pointers?
- C typedef of pointer to structure
- Pointers – Difference between Array and Pointer
- Are “malloc(sizeof(struct a *))” and “malloc(sizeof(struct a))” the same?
- C – SizeOf Pointers
- Swapping pointers in C (char, int)
- What is double star (eg. NSError **)?
- Where in memory are string literals ? stack / heap? [duplicate]
- How to include a dynamic array INSIDE a struct in C?
- How can I return a character array from a function in C?
- C difference between *[] and **
- Difference between *ptr[10] and (*ptr)[10]
- How are we able to access the pointer after deallocating the memory?