下面的代码会输出什么?
```
package main
import "fmt"
type Human interface {
Say() string
}
type Man struct {
}
func (m *Man) Say() string {
return "man"
}
func IsNil(h interface{}) bool {
return h == nil
}
func main() {
var a interface{}
var b *Man
var c *Man
var d Human
var e interface{}
a = b
e = a
fmt.Println(a == nil) // (1)
fmt.Println(e == nil) // (2)
fmt.Println(a == c) // (3)
fmt.Println(a == d) // (4)
fmt.Println(c == d) // (5)
fmt.Println(e == b) // (6)
fmt.Println(IsNil(c)) // (7)
fmt.Println(IsNil(d)) // (8)
}
```
#### 题目的详细讲解,欢迎关注 <font color=red size=5> Go后端干货</font>
#### Go,后端等技术干货分享,欢迎一起交流学习
![WechatIMG99.png](https://static.studygolang.com/190508/d20b3d9f2790729effb6cbea985e443d.png)
有疑问加站长微信联系(非本文作者)