Skip to content

Instantly share code, notes, and snippets.

@Cvar1984
Last active July 25, 2023 09:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Cvar1984/53aeb729a041c25344734bc92676d53e to your computer and use it in GitHub Desktop.
Save Cvar1984/53aeb729a041c25344734bc92676d53e to your computer and use it in GitHub Desktop.
easy c pointer reminder if you forget
#include <stdio.h>
int main(){
int a = 1;
int *b = &a;
printf("addr of B is %p value of B is %p (which is address of pointer A: %p) so *B will have value of %d\n",&b, b, &a, *b);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment