Skip to content

Commit 1984c4c

Browse files
committed
addign 28 TO 30th Q
1 parent 6737d61 commit 1984c4c

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1681,6 +1681,27 @@
16811681

16821682
**[ Back to Top ⬆ ](#table-of-contents---golang)**
16831683

1684+
28. ### If capacity is not defined in slice, what would the capacity be?
1685+
It would be set by default to length of the slice
1686+
1687+
**[ Back to Top ⬆ ](#table-of-contents---golang)**
1688+
1689+
29. ### What is the easiest way to check if a slice is empty?
1690+
You can use the length (len(slice)) property to find if the slice is empty
1691+
1692+
```go
1693+
if(len(slice_data)==0){
1694+
fmt.Println("Empty slice")
1695+
}
1696+
```
1697+
**[ Back to Top ⬆ ](#table-of-contents---golang)**
1698+
1699+
30. ### What is an advantage of Go evaluating implicit types at compile time?
1700+
Types can be implicitly inferred from expressions and don’t need to be explicitly specified.The special handling of interfaces and the implicit typing makes Go feel very lightweight and dynamic.
1701+
1702+
**[ Back to Top ⬆ ](#table-of-contents---golang)**
1703+
1704+
16841705
### Table of Contents - Database Engineering
16851706

16861707

test.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11

22

3-
| 26 | [Do you need to convert the type of a variable of interface{} type passed in a function as an argument?](#do-you-need-to-convert-the-type-of-a-variable-of-interface{}-type-passed-in-a-function-as-an-argument)
4-
| 27 | [Why are goroutines light-weight?](#why-are-goroutines-light-weight)
5-
| 28 | [If capacity is not defined in slice, what would the capacity be?](#if-capacity-is-not-defined-in-slice,-what-would-the-capacity-be)
6-
| 29 | [What is the easiest way to check if a slice is empty?](#what-is-the-easiest-way-to-check-if-a-slice-is-empty)
3+
74
| 30 | [What is an advantage of Go evaluating implicit types at compile time?](#what-is-an-advantage-of-go-evaluating-implicit-types-at-compile-time)

0 commit comments

Comments
 (0)