Created: 2023-01-12 20:17
Status: #concept
Subject: Programming
Tags: C Memory Address Memory Pointer Dereference Operator

Reference Operator

Commonly known as the Address Operator, it is a unary operator that returns the Memory Address of its operand object.

Its inverse operator is the Dereference Operator, and they cancel out like + & - or * & /.

C Syntax

int num;
int *p = # // gets the address of {num} and assigns it to pointer {p}

scanf("%d", &num); // gets a number as input and assigns it to address {&num}

References