Last active
August 29, 2015 14:15
-
-
Save elliptic-shiho/9b1631f03b03e91f7189 to your computer and use it in GitHub Desktop.
Polyglot
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> | |
#define sub void | |
#define main main() | |
#define print printf | |
#define x1 | |
#if 0 | |
main(); | |
#endif | |
sub main { | |
print ("Hello World!"x1); | |
} |
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> | |
#define sub void | |
#define main main() | |
#define print printf | |
#define x1 | |
#if 0 | |
qw="""=; | |
#endif | |
sub main { | |
print ("Hello World!"x1); | |
} | |
#if 0 | |
main(); | |
__END__ | |
""" | |
print "Hello World!" | |
#endif |
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
#<?php echo "Hello World!"; __halt_compiler(); ?> | |
#include <stdio.h> | |
#define sub void | |
#define main main() | |
#define print printf | |
#define x1 | |
#if 0 | |
qw="""=; | |
#endif | |
sub main { | |
print ("Hello World!"x1); | |
} | |
#if 0 | |
main(); | |
__END__ | |
""" | |
print "Hello World!" | |
#endif |
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
#ifndef __cplusplus | |
# include <stdio.h> | |
#else | |
# include <iostream> | |
#endif | |
#if 0 | |
qw='''=; #'; | |
eval 'echo Hello World!;exit; #' if !1; | |
qw#'''#; | |
qw='''=; | |
print "Hello World!\n"; | |
<<s | |
' | |
puts "Hello World!" | |
<<s | |
''' | |
print "Hello World!" | |
""" | |
#endif | |
int main() { | |
#ifndef __cplusplus | |
puts("Hello World!"); | |
#else | |
std::cout<<"Hello World!"<<std::endl; | |
#endif | |
return 0; | |
} | |
#if 0 | |
s | |
; | |
qw#"""#; | |
#endif |
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
// \u000a /* | |
#if 0 | |
echo "Hello, Bash!";exit 0; | |
#endif | |
#ifdef __cplusplus | |
#include <iostream> | |
int main(){std::cout << "Hello, C++!" << std::endl;return 0;} | |
#else | |
#include <stdio.h> | |
int main(){puts("Hello, C!");return 0;} | |
#endif | |
#if 0 | |
// \u000a */ | |
public class polyglot{public static void main(String args[]){System.out.println("Hello, Java!");}} | |
//\u000a /* | |
#endif | |
// */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment