1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Go言語 理解度チェックテスト1

Last updated at Posted at 2019-12-03

Go言語入門者向けの簡単なチェックテストについて解説します。

まずはテスト1!


package main

func main() {s
	as := []struct{ N int }{{N: 10}, {N: 20}}
	for _, a := range as {
		a.N *= 10
	}
	println(as[0].N, as[1].N)
}

この表示結果はいくつになるでしょうか?

実行結果は以下になります。

$ go run main.go 
10 20
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?