Skip to content

Instantly share code, notes, and snippets.

@nelhage nelhage/main.go.c
Last active Nov 19, 2019

Embed
What would you like to do?
A Go/C polyglot
// \
/*
#include <stdio.h>
int main() {
printf("Hello, World from C!\n");
return 0;
}
#if 0
//*/
package main
import "fmt"
func main() {
fmt.Println("Hello, World from Go")
}
// \
/*
#endif
//*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.