Created
January 30, 2021 04:13
-
-
Save nickbclifford/adeec4e7495585e8a1241c86996f1cc5 to your computer and use it in GitHub Desktop.
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* get_ptr() { | |
int x = 7; | |
return &x; | |
} | |
int main(void) { | |
int* my_ptr = get_ptr(); | |
printf("%d\n", *my_ptr); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment