C++ Pointer Operators Last Updated : 20 Dec, 2022 Comments Improve Suggest changes Like Article Like Report Prerequisite: Pointers in C++ A pointer variable is a variable that stores the address of another variable or in other a pointer variable points to the variable whose address is stored inside it. Syntax: int *pointer_name; There are mainly two types of Pointer operators mainly used: Address of operator (&)The indirection operator/Dereference operator (*)Image showing the relation between pointer and variable1. Address-of operator (&) The Address-of operator (&) is a unary operator that returns the memory address of its operand which means it stores the address of the variable, which depicts that we are only storing the address not the numerical value of the operand. It is spelled as the address of the variable. Syntax: gfg = &x; // the variable gfg stores the address of the variable x. Example: C++ // C++ Program to demonstrate // the use of Address-of operator (&) #include <iostream> using namespace std; int main() { int x = 20; // Pointer pointing towards x int* ptr = &x; cout << "The address of the variable x is :- " << ptr; return 0; } OutputThe address of the variable x is :- 0x7fff412f512c2. The indirection operator/Dereference operator (*) The indirection/ dereference operator is a unary operator that returns the value of the variable present at the given address. It is completely opposite to the address-of operator. It is spelled as a value pointed at the address. Example: C++ // C++ Program to Demonstrate // the indirection/Dereference operator #include <bits/stdc++.h> using namespace std; int main() { int self_paced = 3899; int* price; // Pointer storing address of self_paced price = &self_paced; cout << "The value stored at the variable price is Rs : " << (*price); return 0; } OutputThe value stored at the variable price is Rs : 3899 Comment More infoAdvertise with us Next Article C++ Pointer Operators R raj2002 Follow Improve Article Tags : Technical Scripter C++ Technical Scripter 2022 cpp-pointer Practice Tags : CPP Similar Reads Unary Operators In C++ In C++, unary operators are the type of operators that work on a single value (operand). They perform operations like changing a value's sign, incrementing or decrementing it by one, or obtaining its address.C++ has a total of 9 unary operators:Table of ContentIncrement Operator (++)Decrement Operat 6 min read C++ Relational Operators In C++, Relational operators are used to compare two values or expressions, and based on this comparison, it returns a boolean value (either true or false) as the result. Generally false is represented as 0 and true is represented as any non-zero value (mostly 1).Syntax of Relational OperatorsAll C+ 3 min read Operators in C++ C++ operators are the symbols that operate on values to perform specific mathematical or logical computations on given values. They are the foundation of any programming language.Example:C++#include <iostream> using namespace std; int main() { int a = 10 + 20; cout << a; return 0; }Outpu 9 min read Unary Operators in Programming In programming, operators act as powerful tools for manipulating data and performing various operations. Among these, unary operators stand out, functioning on a single operand to transform or evaluate data in different ways. This post explains the types, implementations, and best practices associat 9 min read Operator Overloading in C++ in C++, Operator overloading is a compile-time polymorphism. It is an idea of giving special meaning to an existing operator in C++ without changing its original meaning.In this article, we will further discuss about operator overloading in C++ with examples and see which operators we can or cannot 8 min read C++ Pointers A pointer is a variable that stores the address of another variable. Pointers can be used with any data type, including basic types (e.g., int, char), arrays, and even user-defined types like classes and structures.Create PointerA pointer can be declared in the same way as any other variable but wit 8 min read What are Operators in Programming? Operators in programming are essential symbols that perform operations on variables and values, enabling tasks like arithmetic calculations, logical comparisons, and bitwise manipulations. In this article, we will learn about the basics of operators and their types. Operators in Programming Table of 15+ min read Pointers in Objective-C In Objective-C, Pointers are the variables that hold the memory address of another variable. You must have declared the pointer variable before its use. The size of the pointer depends on the architecture of the system. The pointer variable can be defined as a char, int, float, double, or any other 5 min read Dereference Pointer in C We know that the pointer variable can store the memory address in C language and in this article, we will learn how to use that pointer to access the data stored in the memory location pointed by the pointer. What is a Pointer? First of all, we revise what is a pointer. A pointer is a variable that 4 min read Function Pointer in C In C, a function pointer is a type of pointer that stores the address of a function, allowing functions to be passed as arguments and invoked dynamically. It is useful in techniques such as callback functions, event-driven programs, and polymorphism (a concept where a function or operator behaves di 6 min read Like