# Go 데이터 구조 (Go) > Arrays, slices, maps, structs, pointers, make vs new, nil 값 - 20 면접 질문 - Junior - [면접 질문: Go](https://sharpskill.dev/ko/technologies/go/interview-questions.md) ## 1. Go의 slice란 무엇입니까? **답변** slice는 기반이 되는 array에 대한 동적 뷰로, 가변 길이의 요소 시퀀스를 다룰 수 있게 해줍니다. 컴파일 시점에 고정 크기가 정해지는 array와 달리, slice는 append 같은 연산을 통해 동적으로 커지거나 줄어들 수 있습니다. 이러한 유연성 덕분에 slice는 동질적인 요소 컬렉션을 저장하기 위해 Go에서 가장 많이 사용되는 순차 데이터 구조입니다. ## 2. Go에서 array와 slice의 주요 차이점은 무엇입니까? **답변** 근본적인 차이는 크기에 있습니다. array는 컴파일 시점에 정해지는 고정 크기를 가지며 타입 자체의 일부인 반면, slice는 런타임에 변할 수 있는 동적 크기를 가집니다. 이 차이로 인해 크기가 다른 두 array는 호환되지 않는 타입으로 간주되지만, 같은 요소 타입의 모든 slice는 호환됩니다. 따라서 slice가 더 유연하며 현대 Go 코드에서 더 흔히 사용됩니다. ## 3. Go에서 빈 slice를 어떻게 생성합니까? **답변** 빈 대괄호 뒤에 빈 중괄호를 쓰는 리터럴 구문은 초기화된 빈 slice를 만드는 관용적인 방법입니다. 이 방식은 길이가 0이지만 nil이 아닌 slice를 생성하여 append로 요소를 받을 준비가 되어 있습니다. nil slice가 되는 단순 선언과 달리, 이 명시적 초기화는 요소를 추가할 때 예상치 못한 동작의 위험 없이 즉시 사용 가능한 slice를 보장합니다. ## 17개 추가 질문 이용 가능 - 특정 용량으로 slice를 초기화하려면 어떤 함수를 사용해야 합니까? - 용량에 도달한 slice에 요소를 추가하면 어떻게 됩니까? 무료로 가입하기: https://sharpskill.dev/ko/login ## 기타 Go 면접 주제 - [Go 기초](https://sharpskill.dev/ko/technologies/go/interview-questions/go-basics.md): 25개 질문, Junior - [Go 인터페이스](https://sharpskill.dev/ko/technologies/go/interview-questions/go-interfaces.md): 18개 질문, Junior - [에러 처리](https://sharpskill.dev/ko/technologies/go/interview-questions/error-handling.md): 20개 질문, Junior - [Goroutine 기초](https://sharpskill.dev/ko/technologies/go/interview-questions/goroutines-basics.md): 20개 질문, Junior - [Channels](https://sharpskill.dev/ko/technologies/go/interview-questions/channels.md): 22개 질문, Junior - [Go Modules](https://sharpskill.dev/ko/technologies/go/interview-questions/go-modules.md): 18개 질문, Mid-Level - [HTTP 서버](https://sharpskill.dev/ko/technologies/go/interview-questions/http-server.md): 24개 질문, Mid-Level - [HTTP 클라이언트](https://sharpskill.dev/ko/technologies/go/interview-questions/http-client.md): 18개 질문, Mid-Level - [JSON 인코딩](https://sharpskill.dev/ko/technologies/go/interview-questions/json-encoding.md): 20개 질문, Mid-Level - [Database/SQL](https://sharpskill.dev/ko/technologies/go/interview-questions/database-sql.md): 22개 질문, Mid-Level - [context 패키지](https://sharpskill.dev/ko/technologies/go/interview-questions/context-package.md): 20개 질문, Mid-Level - [Testing](https://sharpskill.dev/ko/technologies/go/interview-questions/testing.md): 22개 질문, Mid-Level - [동시성 패턴](https://sharpskill.dev/ko/technologies/go/interview-questions/concurrency-patterns.md): 24개 질문, Mid-Level - [동기화 프리미티브](https://sharpskill.dev/ko/technologies/go/interview-questions/sync-primitives.md): 22개 질문, Mid-Level - [Go 웹 프레임워크](https://sharpskill.dev/ko/technologies/go/interview-questions/go-web-frameworks.md): 20개 질문, Mid-Level - [REST API 설계](https://sharpskill.dev/ko/technologies/go/interview-questions/rest-api-design.md): 20개 질문, Mid-Level - [gRPC](https://sharpskill.dev/ko/technologies/go/interview-questions/grpc.md): 22개 질문, Mid-Level - [Reflection](https://sharpskill.dev/ko/technologies/go/interview-questions/reflection.md): 20개 질문, Senior - [메모리 관리](https://sharpskill.dev/ko/technologies/go/interview-questions/memory-management.md): 24개 질문, Senior - [성능 최적화](https://sharpskill.dev/ko/technologies/go/interview-questions/performance-optimization.md): 22개 질문, Senior - [Generics](https://sharpskill.dev/ko/technologies/go/interview-questions/generics.md): 20개 질문, Senior - [Go Design Patterns](https://sharpskill.dev/ko/technologies/go/interview-questions/design-patterns.md): 24개 질문, Senior - [Microservices](https://sharpskill.dev/ko/technologies/go/interview-questions/microservices.md): 24개 질문, Senior - [보안 및 인증](https://sharpskill.dev/ko/technologies/go/interview-questions/security-authentication.md): 24개 질문, Senior - [Docker & Containerization](https://sharpskill.dev/ko/technologies/go/interview-questions/docker-containerization.md): 20개 질문, Senior - [Kubernetes Basics](https://sharpskill.dev/ko/technologies/go/interview-questions/kubernetes-basics.md): 22개 질문, Senior - [고급 Go](https://sharpskill.dev/ko/technologies/go/interview-questions/advanced-go.md): 20개 질문, Senior - [CLI 개발](https://sharpskill.dev/ko/technologies/go/interview-questions/cli-development.md): 20개 질문, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/ko/technologies/go/interview-questions/go-data-structures