Skip to content

Instantly share code, notes, and snippets.

@Moong-bee
Last active October 3, 2021 05:47
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
double pointer
#include <stdio.h>
int main() {
int n = 100;
int* p = &n;
int** p2 = &p;
printf("n: %d, &n: %p\n", n, &n);
printf("p: %p, &p: %p *p: %d\n", p, &p, *p);
printf("p2: %p, &p2: %p *p2: %p, **p2: %d\n", p2, &p2, *p2, **p2);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment