Top "Pointers" questions

Data type that "points to" another value stored in memory.

Assigning memory to double pointer?

I am having trouble understanding how to assign memory to a double pointer. I want to read an array of …

c string pointers malloc double-pointer
How to resolve: "cast to pointer from integer of different size" warning in C code?

I am removing gcc warnings from a legacy code. Is it possible to suppress the warning "cast to pointer from …

c pointers gcc-warning
C++ Access derived class member from base class pointer

If I allocate an object of a class Derived (with a base class of Base), and store a pointer to …

c++ inheritance pointers derived-class
How do you convert void pointer to char pointer in C

Ok this has been become sooo confusing to me. I just don't know what is wrong with this assignment: void *…

c pointers void-pointers
What are the barriers to understanding pointers and what can be done to overcome them?

Why are pointers such a leading factor of confusion for many new, and even old, college level students in C …

c++ c pointers
Does free(ptr) where ptr is NULL corrupt memory?

Theoretically I can say that free(ptr); free(ptr); is a memory corruption since we are freeing the memory which …

c pointers memory-management null free
Dereferencing type-punned pointer will break strict-aliasing rules

I used the following piece of code to read data from files as part of a larger program. double data_…

c optimization gcc pointers strict-aliasing
Pointers vs. values in parameters and return values

In Go there are various ways to return a struct value or slice thereof. For individual ones I've seen: type …

pointers go
Static global variables in C++

I would like to make an array of integers via the malloc method. I want this array to be global …

c++ variables pointers static global
Is an array name a pointer?

Is an array's name a pointer in C? If not, what is the difference between an array's name and a …

c arrays pointers