update: quizzes for 2nd 4th secs
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
## What's the difference between `go build` and `go run`?
|
||||
## What is the difference between `go build` and `go run`?
|
||||
1. `go run` just compiles a program; whereas `go build` both compiles and runs it.
|
||||
2. `go run` both compiles and runs a program; whereas `go build` just compiles it. *CORRECT*
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
>
|
||||
|
||||
|
||||
## Which directory `go build` puts the compiled code into?
|
||||
## Go saves the compiled code in a directory. What is the name of that directory?
|
||||
1. The same directory where you call `go build` *CORRECT*
|
||||
2. $GOPATH/src directory
|
||||
3. $GOPATH/pkg directory
|
||||
@@ -24,24 +24,17 @@
|
||||
>
|
||||
|
||||
|
||||
## Which directory `go run` puts the compiled code into?
|
||||
1. The same directory where you call `go run`
|
||||
2. $GOPATH/src directory
|
||||
3. $GOPATH/pkg directory
|
||||
4. Into a temporary directory. *CORRECT*
|
||||
|
||||
|
||||
## Which one below is true for runtime?
|
||||
## Which is true for runtime?
|
||||
1. It happens when your program starts running on a computer *CORRECT*
|
||||
2. It happens while your program is being compiled
|
||||
|
||||
|
||||
## Which one below is true for the compile-time?
|
||||
## Which is true for the compile-time?
|
||||
1. It happens when your program starts running on a computer
|
||||
2. It happens while your program is being compiled *CORRECT*
|
||||
|
||||
|
||||
## In which stage your program can print a message to the console?
|
||||
## When can a Go program print a message to the console?
|
||||
1. While it's being compiled.
|
||||
2. While it runs (after compile-time). *CORRECT*
|
||||
3. While it runs (inside the compile-time).
|
||||
@@ -54,4 +47,4 @@
|
||||
>
|
||||
> **3:** Running can only happen after the compile-time
|
||||
>
|
||||
>
|
||||
>
|
Reference in New Issue
Block a user