Top "Pointers" questions

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

Typedef function pointer?

I'm learning how to dynamically load DLL's but what I don't understand is this line typedef void (*FunctionFunc)(); I have …

c++ c pointers typedef
How to find the 'sizeof' (a pointer pointing to an array)?

First off, here is some code: int main() { int days[] = {1,2,3,4,5}; int *ptr = days; printf("%u\n", sizeof(days)); printf("%u\…

c arrays pointers sizeof
C pointer to array/array of pointers disambiguation

What is the difference between the following declarations: int* arr1[8]; int (*arr2)[8]; int *(arr3[8]); What is the general rule for …

c arrays pointers variable-declaration
Deleting Objects in JavaScript

I'm a bit confused with JavaScript's delete operator. Take the following piece of code: var obj = { helloText: "Hello World!" }; var …

javascript pointers object memory-management garbage-collection
Passing by reference in C

If C does not support passing a variable by reference, why does this work? #include <stdio.h> void …

c pointers pass-by-reference
How can I use pointers in Java?

I know Java doesn't have pointers, but I heard that Java programs can be created with pointers and that this …

java pointers unsafe
What is the difference between char array and char pointer in C?

I am trying to understand pointers in C but I am currently confused with the following: char *p = "hello" This …

c arrays pointers
Returning an array using C

I am relatively new to C and I need some help with methods dealing with arrays. Coming from Java programming, …

c arrays pointers char
What exactly is nullptr?

We now have C++11 with many new features. An interesting and confusing one (at least for me) is the new …

c++ pointers c++11 nullptr
Why should I use a pointer rather than the object itself?

I'm coming from a Java background and have started working with objects in C++. But one thing that occurred to …

c++ c++11 pointers c++-faq