Show Menu
Cheatography

Pointers in C Cheat Sheet (DRAFT) by

Summary of Pointers in C

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Declaring a pointer

The derefe­rence operator (*) is also used to declare a pointer.
Declar­ation:
datatype *varia­ble­_name;
Whitespace is irrele­vant.
int* pi; int * pi; int *pi; int*pi;
all have the same meaning.
 

The "­Address of" Operator