Skip to content

Tag Archives: pointer

Dangling pointer: A pointer pointing to a memory location that has been deleted (or freed) is called a dangling pointer. There are three different ways… Read More
In this article, we will discuss the differences between constant pointer, pointers to constant & constant pointers to constants. Pointers are the variables that hold… Read More
Pointers: A pointer is a variable that holds memory address of another variable. A pointer needs to be de referenced with * operator to access… Read More
Prerequisite: Pointer in C and C++, Double Pointer (Pointer to Pointer) in C A pointer is used to point to a memory location of a… Read More
NULL pointer in C At the very high level, we can think of NULL as a null pointer which is used in C for various… Read More
Pointers store address of variables or a memory location. Syntax:Take a step-up from those "Hello World" programs. Learn to implement data structures like Heap, Stacks,… Read More
Given a matrix, the task is to construct a linked list matrix in which each node is connected to its right and down node.Example:   Input:… Read More
Given an array, write a program to find the sum of array using pointers arithmetic. In this program we make use of * operator .… Read More
In C++, we can pass parameters to a function either by pointers or by reference. In both the cases, we get the same result. So… Read More
Most of the times declarations are simple to read, but it is hard to read some declarations which involve pointer to functions. For example, consider… Read More
The qualifier const can be applied to the declaration of any variable to specify that its value will not be changed ( Which depends upon… Read More
In C/C++, we can assign a struct (or class in C++ only) variable to another variable of same type. When we assign a struct variable… Read More
In C++, variables are passed by reference due to following reasons:1) To modify local variables of the caller function: A reference (or pointer) allows called… Read More
In C/C++, arrays and pointers have similar semantics, except on type information. As an example, given a 3D arrayTake a step-up from those "Hello World"… Read More
In C++, this pointer is passed as a hidden argument to all non-static member function calls. The type of this depends upon function declaration. If… Read More