Total Questions : 50
Expected Time : 50 Minutes

1. Which Rust data type is used to represent floating-point numbers?

2. What is the ownership system in Rust, and how does it prevent memory issues?

3. Which Rust attribute is used to disable the 'dead code' lint warning?

4. Which trait in Rust allows implementing the 'index' operator for custom types?

5. Which Rust trait is used for defining custom string representations of objects?

6. What is the purpose of the 'slice' type in Rust?

7. What is Rust's approach to zero-cost abstractions, and how does it impact the performance of compiled code?

8. How do you create a new Rust project using Cargo?

9. How do you include an external crate in a Rust project?

10. In Rust, what is the purpose of the 'match' keyword?

11. What are Rust macros, and how do they differ from functions?

12. Which Rust macro is used for creating a 'match' expression?

13. Which macro is used for printing to the standard output without a newline?

14. Discuss Rust's philosophy of 'Fearless Concurrency' and how its language features contribute to achieving this.

15. How does Rust ensure memory safety without garbage collection?

16. What is the purpose of the 'Any' trait in Rust?

17. Discuss the role of 'match' in Rust and how it differs from traditional switch statements.

18. Explain Rust's concept of 'Cow' in relation to string handling.

19. Which Rust keyword is used to implement a trait for a type?

20. Which Rust keyword is used to create a new instance of a struct?

21. What is the significance of Rust's 'Cargo' tool in managing dependencies and building projects?

22. What is the purpose of the 'lifetime parameter' in Rust generics?

23. What is the purpose of the 'mut' keyword in Rust?

24. Examine Rust's 'Option' type and its role in handling optional values.

25. In Rust, how do you declare and instantiate a new struct?

26. Discuss the concept of lifetimes in the context of mutable references and how Rust ensures safety.

27. What is the file extension for Rust source code files?

28. What are the key features of Rust's ownership system that contribute to safe concurrency?

29. In Rust, what does the 'Option' type represent?

30. What is the purpose of the 'Result' type in Rust, and how does it differ from 'Option'?

31. In Rust, how do you create an immutable reference to a variable?

32. Which keyword is used to bring a module into scope in Rust?

33. In Rust, how do you print to the standard output?

34. How does Rust achieve zero-cost abstractions and what is the significance of the ownership model in this context?

35. Discuss the role of lifetimes in the context of function return values and their impact on variable scopes.

36. What is the ownership system in Rust designed to prevent?

37. In Rust, what is the purpose of the 'unsafe' keyword?

38. Explain the role of 'match' in Rust and how it facilitates pattern matching beyond simple value checking.

39. How does Rust handle panics, and what mechanisms are in place for recovering from them?

40. What is the purpose of the 'Arc' type in Rust?

41. Explain Rust's concept of ownership and borrowing in the context of mutable and immutable references.

42. Which Rust data type is used for boolean values?

43. What is the purpose of the 'async' keyword in Rust, and how does it relate to asynchronous programming?

44. Discuss Rust's ownership model and how it handles resource cleanup and prevents memory leaks.

45. In Rust, how do you handle a potential panic situation?

46. In Rust, what is the role of the 'mod' keyword?

47. Discuss the use of lifetimes in function signatures and how they impact function parameters.

48. In Rust, what does the 'match' keyword do?

49. What is the primary purpose of the 'Cow' type in Rust?

50. Which attribute is used to mark functions that should be called on program start?