C Go func main() { a := []int{0, 1, 2, 3, 4} for i := 0; i < len(a); i++ { fmt.Println(a[i]) } } void main(void) { int i; int a[5] = {0, 1, 2, 3, 4}; for (i=0;i<5;i++) { printf("%d\n", a[i]); } }
int a = 1, b = 2; int *p = &a; *p = 10; p = &b; *p = 20; printf("%d, %d\n", a, b); } Go func main() { a := 1 b := 2 p := &a *p = 10 p = &b *p = 20 fmt.Printf("%d, %d\n", a, b) } C