当前位置:网站首页>2022-06-21:golang选择题,以下golang代码输出什么?A:3;B:4;C:100;D:编译失败。 package main import ( “fmt“ ) func
2022-06-21:golang选择题,以下golang代码输出什么?A:3;B:4;C:100;D:编译失败。 package main import ( “fmt“ ) func
2022-06-22 06:51:00 【福大大架构师每日一题】
2022-06-21:golang选择题,以下golang代码输出什么?A:3;B:4;C:100;D:编译失败。
package main
import (
"fmt"
)
func main() {
m := [...]int{
'a': 1,
'b': 2,
'c': 3,
}
m['a'] = 3
fmt.Println(len(m))
}
答案2022-06-21:
答案选C。理由是’c’的ASCII的值是99,切片索引99,切片长度必须是100以及以上。
运行结果如下:

边栏推荐
- 关于solidity的delegatecall的坑
- import keras时遇到的错误 TypeError: Descriptors cannot not be created directly. If this call came from a _
- Three methods of thread pool
- Laravel excel 3.1 column width setting does not work
- [PHP] composer 安装
- 【M32】单片机 Code、RO Data、RW Data、ZI Data 简单解读
- ReadWriteLock
- [M32] simple interpretation of MCU code, RO data, RW data and Zi data
- Literature record (part106) -- graph auto-encoder via neighborhood Wasserstein reconstruction
- Detailed explanation of eight locks
猜你喜欢

Cesium加载3D Tiles模型

On the pit of delegatecall of solidity

Reflection operation annotation

【OpenAirInterface5g】RRC NR解析(一)

Training penetration range 02 | 3-star VH LLL target | vulnhub range node1

Common auxiliary classes - (key)

OpenGL - Draw Triangle

Using Monte Carlo method to calculate pi

KV260的PMOD接口介绍
![[PHP] composer 安装](/img/37/7adaca01b95085b42a116bc6b08165.png)
[PHP] composer 安装
随机推荐
leetcode:面试题 08.12. 八皇后【dfs + backtrack】
ERROR: cannot verify nih. At's certificate, issued by "/c=us/o=let's encrypt/cn=r3", WGet reports an error
What is JUC
Data security practice guide - data collection security practice - data classification and classification
Py之Optbinning:Optbinning的简介、安装、使用方法之详细攻略
DL and alignment of spatially resolved single cell transcriptomes with Tangram
Leetcode the shortest path of three (eight) charts per week
实训渗透靶场02|3星vh-lll靶机|vulnhub靶场Node1
-Bash: telnet: command not found solution
5g-guti detailed explanation
【5G NR】手机身份证号IMEI与IMEISV
Anaconda introduction, installation and use nanny level tutorial
Class load memory analysis
import keras时遇到的错误 TypeError: Descriptors cannot not be created directly. If this call came from a _
Introduction to PMOD interface of kv260
[5g NR] RRC connection reconstruction analysis
What exactly is the open source office of a large factory like?
[5g NR] NAS connection management - cm status
keil C关于switch语句问题导致芯片不能正常运行
代理模式与装饰模式到底哪家强