A pointer is a pointer. No matter where it points to.
I mean: you can assign to the same pointer both the address of a region on the stack and on the heap, don’t you? So there cannot be any intrinsic difference between a pointer pointing here or there.
More Related Contents:
- Difference between char *str=”STRING” and char str[] = “STRING”?
- Where in memory are string literals ? stack / heap? [duplicate]
- How to Implement stack by function pointer and how to use it [closed]
- Pointers program
- How to find the ‘sizeof’ (a pointer pointing to an array)?
- Crash or “segmentation fault” when data is copied/scanned/read to an uninitialized pointer
- How come an array’s address is equal to its value in C?
- What is the difference between char array and char pointer in C?
- How do I understand complicated function declarations?
- How can I allocate memory and return it (via a pointer-parameter) to the calling function?
- C pointers : pointing to an array of fixed size
- Array to pointer decay and passing multidimensional arrays to functions
- Why does this code segfault on 64-bit architecture but work fine on 32-bit?
- C: Which character should be used for ptrdiff_t in printf?
- What is guaranteed about the size of a function pointer?
- Why doesn’t scanf need an ampersand for strings and also works fine in printf (in C)?
- How to print variable addresses in C?
- C – Accessing data AFTER memory has been free()ed?
- allocate matrix in C
- Passing two-dimensional array via pointer
- Getting the size of a malloc only with the returned pointer
- Mis-aligned pointers on x86
- How to find the size of an array (from a pointer pointing to the first element array)?
- Can I treat a struct like an array?
- When is it valid to access a pointer to a “dead” object?
- How to check if a pointer is freed already in C?
- Returning a struct pointer
- Heap versus Stack allocation implications (.NET)
- Casting void pointers
- Cast T[][] to T*