# Unsafe Rust (Rust) > unsafe 블록, raw 포인터 (*const T, *mut T), FFI, unsafe 트레이트, Undefined Behavior (UB), safety 불변 조건 - 20 면접 질문 - Senior - [면접 질문: Rust](https://sharpskill.dev/ko/technologies/rust/interview-questions.md) ## 1. Rust에서 unsafe 모드의 슈퍼파워를 활성화하는 키워드는 무엇입니까? **답변** unsafe 키워드는 safe Rust에서 금지된 다섯 가지 기능을 해제합니다: raw 포인터 역참조, unsafe 함수 호출, mutable static 변수 접근, unsafe 트레이트 구현, 그리고 union 필드 접근입니다. 이 블록은 개발자가 memory safety를 보장할 책임을 진다는 것을 컴파일러에 알립니다. ## 2. unsafe 코드는 safe Rust에 비해 몇 가지 추가 기능을 해제하나요? **답변** unsafe 모드는 정확히 다섯 가지 기능을 해제합니다: raw pointer 역참조, unsafe 함수나 메서드 호출, 가변 static 변수 접근 또는 수정, unsafe trait 구현, 그리고 union 필드 접근입니다. 이 다섯 가지 연산이 safe Rust와 unsafe Rust의 유일한 차이입니다. ## 3. Rust에서 변수에 대한 immutable raw pointer를 생성하는 올바른 문법은 무엇인가요? **답변** immutable raw pointer를 생성하는 문법은 let ptr = &x as *const T입니다. *const T 타입은 immutable raw pointer를 나타냅니다. raw pointer 생성은 safe하며, deref만 unsafe 블록이 필요합니다. let ptr: *const T = &x로 암시적 강제 변환을 사용할 수도 있습니다. ## 17개 추가 질문 이용 가능 - Rust에서 *const T와 *mut T의 차이점은 무엇인가요? - safe Rust에서 raw pointer 생성은 허용되지만 역참조는 허용되지 않는 이유는 무엇인가요? 무료로 가입하기: https://sharpskill.dev/ko/login ## 기타 Rust 면접 주제 - [Rust 기초](https://sharpskill.dev/ko/technologies/rust/interview-questions/rust-basics.md): 25개 질문, Junior - [Ownership & Borrowing](https://sharpskill.dev/ko/technologies/rust/interview-questions/ownership-borrowing.md): 22개 질문, Junior - [Structs & Enums](https://sharpskill.dev/ko/technologies/rust/interview-questions/structs-enums.md): 20개 질문, Junior - [에러 처리](https://sharpskill.dev/ko/technologies/rust/interview-questions/error-handling.md): 18개 질문, Junior - [컬렉션](https://sharpskill.dev/ko/technologies/rust/interview-questions/collections.md): 20개 질문, Junior - [모듈과 패키지](https://sharpskill.dev/ko/technologies/rust/interview-questions/modules-packages.md): 18개 질문, Junior - [Traits](https://sharpskill.dev/ko/technologies/rust/interview-questions/traits.md): 22개 질문, Mid-Level - [Generics](https://sharpskill.dev/ko/technologies/rust/interview-questions/generics.md): 20개 질문, Mid-Level - [Lifetimes](https://sharpskill.dev/ko/technologies/rust/interview-questions/lifetimes.md): 20개 질문, Mid-Level - [Iterators & Closures](https://sharpskill.dev/ko/technologies/rust/interview-questions/iterators-closures.md): 22개 질문, Mid-Level - [Smart Pointers](https://sharpskill.dev/ko/technologies/rust/interview-questions/smart-pointers.md): 22개 질문, Mid-Level - [Concurrency Basics](https://sharpskill.dev/ko/technologies/rust/interview-questions/concurrency-basics.md): 20개 질문, Mid-Level - [async/await](https://sharpskill.dev/ko/technologies/rust/interview-questions/async-await.md): 22개 질문, Mid-Level - [Testing](https://sharpskill.dev/ko/technologies/rust/interview-questions/testing.md): 18개 질문, Mid-Level - [Cargo & Ecosystem](https://sharpskill.dev/ko/technologies/rust/interview-questions/cargo-ecosystem.md): 18개 질문, Mid-Level - [Pattern Matching](https://sharpskill.dev/ko/technologies/rust/interview-questions/pattern-matching.md): 18개 질문, Mid-Level - [매크로](https://sharpskill.dev/ko/technologies/rust/interview-questions/macros.md): 20개 질문, Mid-Level - [Serde와 직렬화](https://sharpskill.dev/ko/technologies/rust/interview-questions/serde-serialization.md): 20개 질문, Mid-Level - [고급 트레잇](https://sharpskill.dev/ko/technologies/rust/interview-questions/advanced-traits.md): 22개 질문, Senior - [고급 lifetime](https://sharpskill.dev/ko/technologies/rust/interview-questions/advanced-lifetimes.md): 20개 질문, Senior - [Type System](https://sharpskill.dev/ko/technologies/rust/interview-questions/type-system.md): 20개 질문, Senior - [Tokio & Async I/O](https://sharpskill.dev/ko/technologies/rust/interview-questions/tokio-async.md): 22개 질문, Senior - [성능 최적화](https://sharpskill.dev/ko/technologies/rust/interview-questions/performance-optimization.md): 20개 질문, Senior - [Memory Management](https://sharpskill.dev/ko/technologies/rust/interview-questions/memory-management.md): 20개 질문, Senior - [Web Frameworks](https://sharpskill.dev/ko/technologies/rust/interview-questions/web-frameworks.md): 22개 질문, Senior - [Database Integration](https://sharpskill.dev/ko/technologies/rust/interview-questions/database-integration.md): 20개 질문, Senior - [Rust 디자인 패턴](https://sharpskill.dev/ko/technologies/rust/interview-questions/design-patterns.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/rust/interview-questions/unsafe-rust