Answer these 30 Rust Programming Language MCQs and assess your grip on the subject of Rust Programming Language.
Scroll below and get started!
A. Disk Drives
B. Virtual TTY lines
C. Special character devices
A. Removes the file from its directory
B. Sets the file’s Inode count to one (1)
C. Moves the file in from one directory to another
A. A new process is created
B. The process becomes executable
C. The process is completely overwritten
D. The process blocks waiting for another process to run
A. Generate client-side stubs for interfaces
B. Dynamically link with cross-platform libs
C. Connect with proxy objects across platforms
D. Discover new objects and interfaces at runtime
A. Process 6003 terminates
B. The signal 0 is sent to process 6003
C. The signal 6003 is sent to process 0
D. The existence of process 6003 is checked
A. Encrypt every process’ executable
B. Setuid important processes to the root user
C. Limit system calls to administrators
D. Check all system calls for error conditions
A. -1
B. 2054
C. 19456
D. 0
A. STDIN_FILENO = 0, STDOUT_FILENO = 1, STDERR_FILENO = 2
B. STDOUT_FILENO = 0, STDERR_FILENO = 1, STDERR_FILENO = 2
C. STDERR_FILENO = 0, STDOUT_FILENO = 1, STDIN_FILENO = 2
D. STDIN_FILENO = 0, STDERR_FILENO = 1, STDOUT_FILENO = 2
A. The child inherits the parent’s
B. The child overwrites the parent’s
C. The child has distinct copies of the parent’s
D. The child always has an empty set of closed descriptors
A. Parent and child process terminate simultaneously
B. Child process terminates before its parent process
C. Parent process terminates before its child process
A. Proper program function requires all threads to run quickly
B. Proper program function requires that all threads run at the same speed
C. Proper program function is dependent on the execution sequence and timing of each thread
A. No, it is a 'well-defined' or reserved port.
B. No, it is best to use three or four digit port numbers.
C. Yes, it is as good as any other port number.
D. Yes, it is best to use low numbers for port numbers
A. Watch a set of file descriptors to see which are ready
B. Frequently check email and other network services
C. Sample system process information for use by the top command
A. C rand() function
B. /dev/random
A. I64 as i32
B. Usize as u64
C. I32 as i64
D. F64 as f32
A. Integer
B. Float
C. Boolean
D. Tuple
A. Traits
B. Tuples
C. Enums
D. Structs
A. Cargo --version
B. Cargo init
C. Cargo build
D. Cargo check
A. It's creating a pointer on the heap that points to a value on the stack.
B. It's creating a pointer on the stack that points to a value on the heap.
C. It's creating a memory guard around values to prevent illegal access.
D. It's an abstraction that refers to ownership.
A. A match pattern that branches into True or False
B. Calling ok_error()
C. Calling panic!()
D. A match pattern that may result an early return
A. Array::with_capacity(10)
B. [i32]
C. Array::new(10)
D. [i32; 10]
A. .add()
B. .incr()
C. .clone()
D. .increment()
A. The error is reported and execution continues.
B. An exception is raised. The effect(s) of the exception are defined by the error! macro.
C. The program panics immediately.
D. Rust attempts to convert the error to the local function's error type and return it as Result::Err. If that fails, the program panics.
A. /*
B. #
C. //!
D. //
A. .ignore()
B. An underscore (_)
C. ..
D. Skip
A. Function that ends the lifetime of one of its arguments
B. Struct that contains a reference to a value
C. Function with a generic argument
D. Struct that contains a reference to a boxed value
A. Lifetimes were redundantly specified in previous version of Rust.
B. Lifetimes are specified when a struct is holding a reference to a value.
C. Lifetimes are specified when certain values must outlive others.
D. Lifetimes are always inferred by the compiler.
A. !
B. None
C. Null
D. ()
A. Copy is enabled for primitive, built-in types.
B. Without Copy, Rust applies move semantics to a type's access.
C. When using Clone, copying data is explicit.
D. Until a type implements either Copy or Clone, its internal data cannot be copied.
A. Arc
B. Box
C. Both Arc
D. Rc
A. Zero-sized types
B. Structs
C. Trait objects
D. Floating-point numbers
A. Mutex
B. Rc
C. Arc
D. Mutex
A. Loop
B. For
C. While
D. Do
A. Enums are useful in matching patterns.
B. Option is an enum type.
C. Enum variants can have different types with associated data.
D. The term enum is short for enummap
A. It matches everything.
B. It matches underscores.
C. It matches any value that has a length of 1.
D. It matches nothing.
A. A &mut T reference is allowed. However it may not cpexists with any other references. and may be created only in single-threaded code.
B. UnsafeCell
C. The only safe operation is the .get() method, which returns only a raw pointer.
D. Non. UnsafeCell
A. Need to reduce code duplication by concretizing values and restricting parameters in functions
B. Need to reduce code duplication by abstracting values further, such as in function parameters
C. Need a supertrait
D. Are not sure if you need a specific kind of trait
A. Cargo new
B. Rustup init
C. Cargo start
D. Rust new-project