Skip to content

Instantly share code, notes, and snippets.

@srfrog
Forked from nelhage/main.go.c
Created November 19, 2019 06:55
Show Gist options
  • Save srfrog/afeca64e931b1b6e8af649278805d1c1 to your computer and use it in GitHub Desktop.
Save srfrog/afeca64e931b1b6e8af649278805d1c1 to your computer and use it in GitHub Desktop.
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