Created
March 2, 2024 03:35
-
-
Save komamitsu/0f821b31210b73c1f72e14b96e90ec72 to your computer and use it in GitHub Desktop.
"Hello, World!" without recursions or loop
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> | |
#include <ucontext.h> | |
#define N 1000000 | |
int main(){ | |
int i = 0; | |
ucontext_t ctxt; | |
getcontext(&ctxt); | |
if (i++ < N) { | |
printf("Hello, World!\n"); | |
setcontext(&ctxt); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-D_XOPEN_SOURCE
option may be needed.