Last active
April 2, 2021 22:54
-
-
Save vxcute/828582bf67f1f9a755c29a346a65b26b 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> | |
#include <stdnoreturn.h> | |
// https://godbolt.org/z/Pqv8YTPWc | |
int main(){ | |
noreturn void π€―(){printf("C Is Cool");} // noreturn means that function when called will never return and code after it won't be executed even when return statement is executed in it + nested functions are allowed | |
volatile const char * π§ = "brain"; // works with clang | |
volatile register int π = 1337, π = 20, π€£ = 10, π = 0, π³ = 90; | |
const register int π = 0x777466; // "wtf" in hex | |
int π©Έ[] = {π,π,π,π€£,π,π³}; | |
int π [6]; | |
for(int i = 0; i < 6; i++) | |
{ | |
π [i] = π©Έ[i]^0x1337; | |
} | |
for(int i = 0 ; i < 6; i++) | |
{ | |
printf("%d\n",π [i]); | |
} | |
π*=2; | |
π€―(); | |
printf("%d", π+π); // this will never be executed because π€―() won't return | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment