Skip to content

Instantly share code, notes, and snippets.

@while0pass
Last active October 9, 2020 20:23
Show Gist options
  • Save while0pass/374574 to your computer and use it in GitHub Desktop.
Save while0pass/374574 to your computer and use it in GitHub Desktop.
/* p1, p2, p3 defined as pointers to int, while i1, i2 and i3 as just int variables */
int *p1, i1;
int* p2, i2;
int * p3, i3;
/* constant pointer to int */
int *const p;
/* pointer to constant int */
int const *p;
const int *p
/* constant pointer to constant int */
int const *const p;
const int *const p;
/* array of pointers to int */
int *a[];
/* pointer to array of int */
int (*a)[];
int a[]; /* the same, as array in C is a pointer to its first element */
/* function returning pointer to int */
int *f();
/* pointer to function returning int */
int (*f)();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment