Created
May 1, 2026 23:18
-
-
Save pkutaj/c4e7f1d9b12deb0ecadbb1340e97f161 to your computer and use it in GitHub Desktop.
CTJ47_Why_a_Stack snippet
This file contains hidden or 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* dangerous() { | |
| int x = 42; | |
| return &x; | |
| } | |
| int main() { | |
| int* p = dangerous(); | |
| printf("print pointer of dangerious: %d\n", *p); | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment