Last active
July 25, 2023 09:57
-
-
Save Cvar1984/53aeb729a041c25344734bc92676d53e to your computer and use it in GitHub Desktop.
easy c pointer reminder if you forget
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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