Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 723 Bytes

File metadata and controls

42 lines (31 loc) · 723 Bytes

Rust (Programming Language)

Q1. Which type cast preserves the mathematical value in all cases?

  • i64 as i32
  • usize as u64
  • i32 as i64
  • f64 as f32

Q2. What do the vertical bars represent here?

str::thread::spawn(|| {
  println!("LinkedIn");
});
  • a closure
  • a thread
  • a future
  • a block

Q3. Which choice is not a scalar data type?

  • integer
  • float
  • boolean
  • tuple

Q4. _ cannot be destructured.

  • Traits
  • Tuples
  • Enums
  • Structs

Q5. Which cargo command checks a program for error without creating a binary executable?

  • cargo --version
  • cargo init
  • cargo build
  • cargo check