Rust - Introduction Flashcards

1
Q

Rust is what type of programming language?

A

Rust is a systems level programming language developed by Graydon Hoare.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

System and application programming languages face two major problems

A

It is difficult to write secure code.
It is difficult to write multi-threaded code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Rust focuses on three goals

A

Safety
Speed
Concurrency

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Why does Rust perform well at runtime?

A

Because it doesn’t have a Garbage Collector

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Rust is safe from what type of memory issues

A

Dangling Pointers
Buffer overruns
Memory leaks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Write a hello world program

A

fn main(){
println!(“Hello world”);
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a macro?

A

In Rust, a macro is a feature that allows you to write code that writes other code.

It’s like a template for generating code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly