Search test library by skills or roles
⌘ K

Adaface Sample Rust Questions

Here are some sample Rust questions from our premium questions library (10273 non-googleable questions).

Skills

🧐 Question

Easy

Join Handles
Concurrency
Solve
Review the following two Rust code snippets:
 image
Notice the handle.join().unwrap() line added in snippet two. Pick the correct statements:
            
            A: Snippet one prints 1 to 5 in the spawned thread and 1 to 3 in the main thread always.
            B: Snippet one prints 1 to 3 in the main thread but spawned thread might be closed before it prints all the numbers.
            C: Snippet two prints 1 to 5 in the spawned thread and 1 to 3 in the main thread always. 
            D: Snippet two prints 1 to 3 in the main thread but the spawned thread might be closed before it prints all the numbers.

Medium

Mutable Sample
Structs
Variables and Mutability
Solve
What does the following Rust code print?
 image

Medium

Passed Function
Closures
Solve
Review the following code and pick the correct statements:
 image
A: The code prints 1223
            B: The code prints 1111
            C: The code prints 1234
            D: The callPassedFunction(passedFunction) on line 7 makes a copy of passedFunction to become the argument of callPassedFunction. The copy gets executed and the x of copy becomes 2, but the original closure still holds a value of 1 for its captured x.
            E: The callPassedFunction(passedFunction) on line 7 makes a copy of passedFunction to become the argument of callPassedFunction. The copy gets executed and x of the copy and the origin both become 2.
🧐 Question🔧 Skill

Easy

Join Handles
Concurrency

2 mins

Rust
Solve

Medium

Mutable Sample
Structs
Variables and Mutability

2 mins

Rust
Solve

Medium

Passed Function
Closures

2 mins

Rust
Solve
🧐 Question🔧 Skill💪 Difficulty⌛ Time
Join Handles
Concurrency
Rust
Easy2 mins
Solve
Mutable Sample
Structs
Variables and Mutability
Rust
Medium2 mins
Solve
Passed Function
Closures
Rust
Medium2 mins
Solve

Trusted by recruitment teams in enterprises globally

Amazon Morgan Stanley Vodafone United Nations HCL PayPal Bosch WeWork Optimum Solutions Deloitte Microsoft NCS Doubtnut Sokrati J&T Express Capegemini

We evaluated several of their competitors and found Adaface to be the most compelling. Great library of questions that are designed to test for fit rather than memorization of algorithms.


Swayam Narain, CTO, Affable

hashtag image heart icon Swayam
customers across world
Join 1500+ companies in 80+ countries.
Try the most candidate friendly skills assessment tool today.
g2 badges
Ready to streamline your recruitment efforts with Adaface?
Ready to streamline your recruitment efforts with Adaface?
logo
40 min tests.
No trick questions.
Accurate shortlisting.
ada
Ada
● Online
Previous
Score: NA
Next
✖️