Top "Pointers" questions

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

Difference between char* and const char*?

What's the difference between char* name which points to a constant string literal, and const char* name

c pointers constants
What is the difference between NULL, '\0' and 0?

In C, there appear to be differences between various values of zero -- NULL, NUL and 0. I know that the …

c pointers null
Correct format specifier to print pointer or address?

Which format specifier should I be using to print the address of a variable? I am confused between the below …

c pointers format memory-address
Pointers in Python?

I know Python doesn't have pointers, but is there a way to have this yield 2 instead >>> a = 1 &…

python pointers
Deleting a pointer in C++

Context: I'm trying to wrap my head around pointers, we just saw them a couple of weeks ago in school …

c++ pointers delete-operator
Constant pointer vs Pointer to constant

I want to know the difference between const int* ptr; and int * const ptr; and how it works. It is …

c pointers constants
Why use pointers?

I know this is a really basic question, but I've just started with some basic C++ programming after coding a …

c++ c pointers
How to increment a pointer address and pointer's value?

Let us assume, int *p; int a = 100; p = &a; What will the following code will do actually and how? …

c pointers
How to get the real and total length of char * (char array)?

For a char [], I can easily get its length by: char a[] = "aaaaa"; int length = sizeof(a)/sizeof(char); // length=6 …

c++ c arrays pointers char
How to access the contents of a vector from a pointer to the vector in C++?

I have a pointer to a vector. Now, how can I read the contents of the vector through pointer?

c++ pointers vector