Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e943968

Browse files
adding interview questions 6 and 7
1 parent 48a762d commit e943968

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

‎README.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1238,6 +1238,8 @@
12381238
| 3 | [What kind of projects are suitable to be built in Golang?](#what-kind-of-projects-are-suitable-to-be-built-in-golang)
12391239
| 4 | [Is Golang an object oriented language?](#is-golang-an-object-oriented-language)
12401240
| 5 | [What are the data types in Golang?](#what-are-the-data-types-in-golang)
1241+
| 6 | [Can you return multiple values from a function?](#can-you-return-multiple-values-from-a-function)
1242+
| 7 | [What is a GOPATH?](#what-is-a-gopath)
12411243

12421244

12431245

@@ -1295,4 +1297,35 @@
12951297
4. **Interface type**
12961298

12971299

1298-
**[ Back to Top ⬆ ](#table-of-contents---golang)**
1300+
**[ Back to Top ⬆ ](#table-of-contents---golang)**
1301+
1302+
1303+
6. ### Can you return multiple values from a function?
1304+
1305+
Yes. A Go function can return multiple values, each separated by commas in the return statement.
1306+
1307+
```go
1308+
package main
1309+
1310+
import "fmt"
1311+
1312+
func foo() (string, string) {
1313+
return "foo", "ball"
1314+
}
1315+
1316+
func main() {
1317+
fmt.Println(foo())
1318+
}
1319+
```
1320+
1321+
1322+
**[ Back to Top ⬆ ](#table-of-contents---golang)**
1323+
1324+
1325+
7. ### What is a GOPATH?
1326+
1327+
1328+
The GOPATH environment variable specifies the location of your workspace. It defaults to a directory named go inside your home directory <br/>
1329+
The command go env GOPATH prints the effective current GOPATH; it prints the default location if the environment variable is unset.
1330+
1331+
**[ Back to Top ⬆ ](#table-of-contents---golang)**

‎sentence_to_hashing_converter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ function hashing(num=0,str) {
2020
return `| ${num} | [${str}?](#${hashed})`
2121
}
2222

23-
console.log(hashing(6,'What are the data types in Golang'));
23+
console.log(hashing(7,'What is a GOPATH'));

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /