Update README.md

This commit is contained in:
WH64 2022-11-12 17:31:27 +09:00 committed by GitHub
parent e17974a7e2
commit ace1f9b68d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,22 +1,15 @@
```c
// main.c
#include <stdio.h>
#include <stdlib.h>
```go
package main
#define MAX_MESSAGE_SIZE 30
import "fmt"
int main(int argc, char **argv) {
char *str = malloc(sizeof(char) * MAX_MESSAGE_SIZE);
str = argv[1];
puts(str);
free(str);
return 0;
func main() {
fmt.Println("Hello, World!")
}
```
```sh
[projecttl@fedora ~]$ gcc -o a.out main.c
[projecttl@fedora ~]$ ./a.out 'Hello, World!'
[projecttl@fedora ~]$ go build -o profile main.go
[projecttl@fedora ~]$ ./profile
Hello, World!
[projecttl@fedora ~]$
```