3

Go 语言笔试面试题汇总

 3 years ago
source link: https://geektutu.com/post/qa-golang.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Go 语言笔试面试题汇总

源代码/数据集已上传到 Github - interview-questions

golang interview questions

Go 语言笔试面试题汇总Github

基础语法

  • 01 =:= 的区别?
  • 02 指针的作用
  • 03 Go 允许多个返回值吗?
  • 04 Go 有异常类型吗?
  • 05 什么是协程(Goroutine)
  • 06 如何高效地拼接字符串
  • 07 什么是 rune 类型
  • 08 如何判断 map 中是否包含某个 key ?
  • 09 Go 支持默认参数或可选参数吗?
  • 10 defer 的执行顺序
  • 11 如何交换 2 个变量的值?
  • 12 Go 语言 tag 的用处?
  • 13 如何判断 2 个字符串切片(slice) 是相等的?
  • 14 字符串打印时,%v%+v 的区别
  • 15 Go 语言中如何表示枚举值(enums)?
  • 16 空 struct{} 的用途

实现原理

  • 01 init() 函数是什么时候执行的?
  • 02 Go 语言的局部变量分配在栈上还是堆上?
  • 03 2 个 interface 可以比较吗 ?
  • 04 2 个 nil 可能不相等吗?
  • 05 简述 Go 语言GC(垃圾回收)的工作原理
  • 06 函数返回局部变量的指针是否安全?
  • 07 非接口非接口的任意类型 T() 都能够调用 *T 的方法吗?反过来呢?

并发编程

  • 01 无缓冲的 channel 和有缓冲的 channel 的区别?
  • 02 什么是协程泄露(Goroutine Leak)?
  • 03 Go 可以限制运行时操作系统线程的数量吗?

代码输出

  • 变量与常量
  • defer 延迟调用

专题: Go 语言面试题

本文发表于 2020-09-04,最后修改于 2021-05-10。

本站永久域名「 geektutu.com 」,也可搜索「 极客兔兔 」找到我。


上一篇 « Go Context 并发编程简明教程 下一篇 » Go 语言笔试面试题(基础语法)


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK