18 real Ownership & Borrowing questions from the Rust bank, as asked in Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd — free to start.
1. What is Ownership?
Junior
A.the discipline whereby each value has exactly one variable responsible for it, and the value is dropped when that variable goes out of scope
B.an immutable borrow written with a single ampersand that grants read-only access and may coexist with any number of others to the same value
C.a borrow written with ampersand-mut that grants read-write access and, while it exists, must be the exclusive way the value is accessed
D.the compile-time component that enforces the aliasing rule of one writer XOR many readers and rejects programs that would otherwise have data races or use-after-free
2. Which term means: "the discipline whereby each value has exactly one variable responsible for it, and the value is dropped when that variable goes out of scope"?
A.Ownership — the transfer of responsibility for a value to a new binding, after which the original binding is invalidated and can no longer be used
B.Ownership — the behavior of types like integers and bool whose values are duplicated bit-for-bit on assignment, leaving the original binding still usable
C.Ownership — the discipline whereby each value has exactly one variable responsible for it, and the value is dropped when that variable goes out of scope
D.Ownership — a borrow written with ampersand-mut that grants read-write access and, while it exists, must be the exclusive way the value is accessed
A.the compile-time component that enforces the aliasing rule of one writer XOR many readers and rejects programs that would otherwise have data races or use-after-free
B.the transfer of responsibility for a value to a new binding, after which the original binding is invalidated and can no longer be used
C.the discipline whereby each value has exactly one variable responsible for it, and the value is dropped when that variable goes out of scope
D.a borrow written with ampersand-mut that grants read-write access and, while it exists, must be the exclusive way the value is accessed
5. Which term means: "the transfer of responsibility for a value to a new binding, after which the original binding is invalidated and can no longer be used"?
A.Move — the behavior of types like integers and bool whose values are duplicated bit-for-bit on assignment, leaving the original binding still usable
B.Move — the discipline whereby each value has exactly one variable responsible for it, and the value is dropped when that variable goes out of scope
C.Move — the compile-time component that enforces the aliasing rule of one writer XOR many readers and rejects programs that would otherwise have data races or use-after-free
D.Move — the transfer of responsibility for a value to a new binding, after which the original binding is invalidated and can no longer be used
A.an immutable borrow written with a single ampersand that grants read-only access and may coexist with any number of others to the same value
B.the behavior of types like integers and bool whose values are duplicated bit-for-bit on assignment, leaving the original binding still usable
C.the discipline whereby each value has exactly one variable responsible for it, and the value is dropped when that variable goes out of scope
D.the compile-time component that enforces the aliasing rule of one writer XOR many readers and rejects programs that would otherwise have data races or use-after-free
8. Which term means: "an immutable borrow written with a single ampersand that grants read-only access and may coexist with any number of others to the same value"?
A.Shared reference — the discipline whereby each value has exactly one variable responsible for it, and the value is dropped when that variable goes out of scope
B.Shared reference — the compile-time component that enforces the aliasing rule of one writer XOR many readers and rejects programs that would otherwise have data races or use-after-free
C.Shared reference — a borrow written with ampersand-mut that grants read-write access and, while it exists, must be the exclusive way the value is accessed
D.Shared reference — an immutable borrow written with a single ampersand that grants read-only access and may coexist with any number of others to the same value
A.the discipline whereby each value has exactly one variable responsible for it, and the value is dropped when that variable goes out of scope
B.the compile-time component that enforces the aliasing rule of one writer XOR many readers and rejects programs that would otherwise have data races or use-after-free
C.the transfer of responsibility for a value to a new binding, after which the original binding is invalidated and can no longer be used
D.a borrow written with ampersand-mut that grants read-write access and, while it exists, must be the exclusive way the value is accessed
11. Which term means: "a borrow written with ampersand-mut that grants read-write access and, while it exists, must be the exclusive way the value is accessed"?
A.Mutable reference — a borrow written with ampersand-mut that grants read-write access and, while it exists, must be the exclusive way the value is accessed
B.Mutable reference — the transfer of responsibility for a value to a new binding, after which the original binding is invalidated and can no longer be used
C.Mutable reference — the behavior of types like integers and bool whose values are duplicated bit-for-bit on assignment, leaving the original binding still usable
D.Mutable reference — an immutable borrow written with a single ampersand that grants read-only access and may coexist with any number of others to the same value
A.the transfer of responsibility for a value to a new binding, after which the original binding is invalidated and can no longer be used
B.the discipline whereby each value has exactly one variable responsible for it, and the value is dropped when that variable goes out of scope
C.the compile-time component that enforces the aliasing rule of one writer XOR many readers and rejects programs that would otherwise have data races or use-after-free
D.a borrow written with ampersand-mut that grants read-write access and, while it exists, must be the exclusive way the value is accessed
14. Which term means: "the compile-time component that enforces the aliasing rule of one writer XOR many readers and rejects programs that would otherwise have data races or use-after-free"?
A.Borrow checker — the compile-time component that enforces the aliasing rule of one writer XOR many readers and rejects programs that would otherwise have data races or use-after-free
B.Borrow checker — an immutable borrow written with a single ampersand that grants read-only access and may coexist with any number of others to the same value
C.Borrow checker — the discipline whereby each value has exactly one variable responsible for it, and the value is dropped when that variable goes out of scope
D.Borrow checker — the transfer of responsibility for a value to a new binding, after which the original binding is invalidated and can no longer be used
A.an immutable borrow written with a single ampersand that grants read-only access and may coexist with any number of others to the same value
B.the behavior of types like integers and bool whose values are duplicated bit-for-bit on assignment, leaving the original binding still usable
C.the discipline whereby each value has exactly one variable responsible for it, and the value is dropped when that variable goes out of scope
D.the compile-time component that enforces the aliasing rule of one writer XOR many readers and rejects programs that would otherwise have data races or use-after-free
17. Which term means: "the behavior of types like integers and bool whose values are duplicated bit-for-bit on assignment, leaving the original binding still usable"?
A.Copy semantics — a borrow written with ampersand-mut that grants read-write access and, while it exists, must be the exclusive way the value is accessed
B.Copy semantics — the behavior of types like integers and bool whose values are duplicated bit-for-bit on assignment, leaving the original binding still usable
C.Copy semantics — the transfer of responsibility for a value to a new binding, after which the original binding is invalidated and can no longer be used
D.Copy semantics — the compile-time component that enforces the aliasing rule of one writer XOR many readers and rejects programs that would otherwise have data races or use-after-free
Answers, AI explanations, and a scored voice mock interview
Sign up free to check your answers with explanations, ask the AI tutor anything on any question, and take one full AI mock interview — scored like a real panel.