Created
January 30, 2026 14:39
-
-
Save eliminmax/95ece23b3305e4d9124572e01b3e9ea1 to your computer and use it in GitHub Desktop.
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
| /* | |
| * SPDX-FileCopyrightText: 2026 Eli Array Minkoff | |
| * | |
| * SPDX-License-Identifier: 0BSD | |
| */ | |
| // trivial C23 quine using #embed | |
| // | |
| // probably should be considered cheating | |
| #include <stdio.h> | |
| static const char SOURCE[] = { | |
| #embed __FILE__ | |
| , 0 | |
| }; | |
| int main() { | |
| fputs(SOURCE, stdout); | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tested with clang-20.
Compilation command:
clang -std=c23 -Wall -Wextra -Wpedantic hash_embed_quine.c -o hash_embed_quineOutput is identical to source.