当前位置:网站首页>2022-06-28: what does the following golang code output? A:true; B:false; C:panic; D: Compilation failed. package main import “fmt“ func main() {
2022-06-28: what does the following golang code output? A:true; B:false; C:panic; D: Compilation failed. package main import “fmt“ func main() {
2022-06-28 22:23:00 【Fuda scaffold constructor's daily question】
2022-06-28: following golang What does the code output ?A:true;B:false;C:panic;D: Compile failed .
package main
import "fmt"
func main() {
var p [100]int
var m interface{
} = [...]int{
99: 0}
fmt.Println(p == m)
}
answer 2022-06-28:
Answer selection A. This question is optional D, A little unexpected . Son belongs to Lao Tzu , Sons do not belong to Lao Tzu . Assignment only , Not suitable for comparison .
A value x of non-interface type X and a value t of interface type T are comparable when values of type X are comparable and X implements T. They are equal if t’s dynamic type is identical to X and t’s dynamic value is equal to x. —— The above is from https://go.dev/ref/spec#Operators

边栏推荐
- Laravel文档阅读笔记-Adding a Markdown editor to Laravel
- Dart的类扩展、可选类型扩展
- Yiming Anke submitted a statement to the Hong Kong Stock Exchange: the loss doubled in 2021, and the past financing amount was exaggerated
- If you are a C developer, look at these three explicit programming techniques
- 00 後雲原生工程師:用 Zadig 為思創科技(廣州公交)研發開源節流
- 【HackTheBox】 meow
- Advanced workplace | understand the "entry" of position advantages
- 【HackTheBox】dancing(SMB)
- 运维体系建设思考 - 稳定性篇
- [linq] execute SQL like in statements using EF to LINQ
猜你喜欢

After reading the list of global patent and chip buyers, I understand that high innovation can lead to high profits

场景化接口开发利器,金蝶云苍穹新版OpenAPI引擎来了!

Axure custom components

GO语言-反射reflect

Use of dynamic panels

ansible生产环境使用场景(七):批量部署elk客户端

稳!上千微服务如何快速接入 Zadig(Helm Chart 篇)

这个简单的小功能,半年为我们产研团队省下213个小时

Zadig 面向開發者的自測聯調子環境技術方案詳解

Considerations on the construction of operation and maintenance system - stability
随机推荐
【selenium自动化过程中的api抓包】browsermobproxy的安装和配置
Water brother's code
职业问诊 | 面试时被问到职业规划该怎么回答?
code review
宜明昂科在港交所递表:2021年亏损翻倍,过往融资额存在夸大情形
apipost脚本使用讲解一~全局变量
Rust language survey results in 2021
Gross vs60 billion. Is food safety the biggest obstacle to Weilong's listing?
torch.nn.Transformer导入失败
rosdep update 使用小鱼fishros解决ros1/ros2问题 2022
【SSH】无密码登录
Move the mouse out of the selected area style cancel
00 后云原生工程师:用 Zadig 为思创科技(广州公交)研发开源节流
Set when quartz scheduled task trigger starts
Appium automated test Jiugongge unlock
Axure custom components
Pat 1024 palindromic number (25 points) sum of large integers
Webrtc audio and video development - experience
Wechat applet realizes left sliding deletion
Zadig 正式推出 VS Code 插件,本地开发更高效