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

Adaface questions are trusted by 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 default library of questions that are designed to test for fit rather than memorization of algorithms.


Swayam Narain, CTO, Affable

hashtag image heart icon Swayam
Join 1200+ companies in 75+ countries.
Prøv det mest kandidatvenlige færdighedsvurderingsværktøj i dag.
Ready to streamline your recruitment efforts with Adaface?
Ready to streamline your recruitment efforts with Adaface?
40 min tests.
No trick questions.
Accurate shortlisting.
Ada
Ada
● Online
Previous
Score: NA
Next
✖️