Skip to content

Tag Archives: cpp-pointer

Prerequisite: Array BasicsIn C/C++, multidimensional arrays in simple words as an array of arrays. Data in multidimensional arrays are stored in tabular form (in row… Read More
Prerequisite: Array BasicsIn C/C++, multidimensional arrays in simple words as an array of arrays. Data in multidimensional arrays are stored in tabular form (in row… Read More
A pointer is a variable whose value is the address of another variable, i.e., direct address of the memory location. Like any variable or constant,… 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
Before moving forward with using const with Reference to a Pointers, let us first see what they are one by one: Pointers are used to… Read More
Pointer: A pointer is a variable which contains the address of another variable, i.e., address of the memory location of the variable. Like any variable… Read More
Pointers in C++: Pointers are a symbolic representation of addresses. They enable programs to simulate call-by-reference as well as to create and manipulate dynamic data… 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: datatype *var_name; Example: pointer “ptr” holds address of an integer variable or holds address of… Read More
Shared Pointers : A std::shared_ptr is a container for raw pointers. It is a reference counting ownership model i.e. it maintains the reference count of its… Read More
Given a string, the task is to reverse this String using pointers. Examples: Input: Geeks Output: skeeG Input: GeeksForGeeks Output: skeeGroFskeeG Approach: This method involves… Read More
Pre-requisite: Pointers in C++ Given a string of lowercase english alphabets. The task is to count number of vowels present in a string using pointers… Read More
Given two strings, compare the strings using pointers Examples: Input: str1 = geeks, str2 = geeks Output: Both are equal Input: str1 = hello, str2… Read More
The std::is_pointer template of C++ STL is used to check whether the given type is pointer or not. It returns a boolean value showing the… Read More