Crust Programming Language
- 59Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
59 questions
- 1Crust is described as a variant of Rust that fully embraces_____rather than Rust's usual safety restrictions.
Hint
Think of operations involving raw pointers and minimal compiler-enforced guarantees.
Answer
unsafe
- 2In Crust, every function is required to be_____.
Hint
This keyword indicates that the function may perform operations requiring manual safety reasoning.
Answer
unsafe
- 3Crust avoids references and instead uses only_____.
Hint
These are explicitly manipulated memory addresses.
Answer
pointers
- 4Crust does not use the standard library; it relies on_____instead.
Hint
This is the C system library interface.
Answer
libc
- 5The stated default-mutability rule in Crust was described as_____rather than a firmly established mandatory rule.
Hint
The speaker considered possibly removing this rule later.
Answer
optional
- 6Crust is intended to make Rust more comfortable for developers accustomed to programming in_____.
Hint
The language uses pointers and libc in a way familiar to these developers.
Answer
C
- 7The session explicitly warned that this unsafe Rust variant should not be used for_____applications.
Hint
These applications require strong safety guarantees.
Answer
security critical
- 8The programming activity was characterized primarily as_____programming rather than production software development.
Hint
It was undertaken for experimentation and enjoyment.
Answer
recreational
- 9Before C, Ken Thompson created the_____programming language.
Hint
Its name precedes C alphabetically.
Answer
B
- 10The name C was explained as referring to its position after_____in the sequence of languages.
Hint
C comes immediately after this letter.
Answer
B
- 11B was characterized as a genuinely_____language because it is no longer used in practice.
Hint
This contrasts with languages such as COBOL that remain alive through legacy code.
Answer
dead
- 12The available B documentation was described as a user_____written by Ken Thompson.
Hint
It explains the language and provides example programs.
Answer
reference
- 13B programs look similar to C programs, but they generally do not specify variable_____.
Hint
The language was described as having only one general data category.
Answer
types
- 14The single type described for B is a machine_____.
Hint
It represents the machine's natural word-sized value.
Answer
word
- 15In B, variables are generally defined as variables of type_____.
Hint
This is the language's only general data type.
Answer
word
- 16B supports the keyword_____for variables whose storage is automatically managed with function scope.
Hint
The keyword later appeared in C as well.
Answer
auto
- 17The B reference was reported to be approximately_____pages long.
Hint
The number is a little over twenty.
Answer
21
- 18Automatic storage is allocated for each_____of a function.
Hint
This means each time the function is called.
Answer
invocation
- 19Automatic storage in the discussion was identified with_____storage.
Hint
It is allocated and released as functions enter and leave.
Answer
stack
- 20External storage is allocated before_____begins.
Hint
This storage exists before the program starts running.
Answer
execution
- 21External variables are available to_____functions.
Hint
Their visibility is broader than that of internal variables.
Answer
any and all
- 22Internal storage is local to a function but remains available across all_____of that function.
Hint
This behavior resembles a static local variable.
Answer
invocations
- 23The B keyword used to declare external names is_____.
Hint
It tells the compiler that a name is defined elsewhere.
Answer
extern
- 24B declarations must appear before the first_____of the declared variable.
Hint
The declaration needs to precede the variable's first appearance in an expression.
Answer
use
- 25An external name must also be externally_____somewhere in the program.
Hint
A declaration alone does not provide the implementation or storage.
Answer
defined
- 26The B example used the external function_____to output a character.
Hint
This function also exists in the C runtime library.
Answer
putchar
- 27The value passed to putchar was interpreted as an integer containing an_____code.
Hint
This character encoding maps integers to printable characters.
Answer
ASCII
- 28In a minimal Crust program, disabling the standard library requires the crate-level attribute_____.
Hint
The attribute name combines the word for absence with the standard library abbreviation.
Answer
no_std
- 29A Crust program without the usual Rust entry-point setup may require the crate-level attribute_____.
Hint
This indicates that the normal Rust-generated main entry point is not being used.
Answer
no_main
- 30To link Crust code with C functions, the declarations were marked as_____C.
Hint
This specifies the foreign calling convention and external linkage.
Answer
extern
- 31The attribute used to prevent Rust from changing an exported symbol's name was_____.
Hint
It preserves the exact linker-visible name.
Answer
no_mangle
- 32The build process first emitted an_____file instead of directly producing the final executable.
Hint
This intermediate file contains compiled machine code for later linking.
Answer
object
- 33The C implementation file was compiled with GCC's_____option to produce an object file.
Hint
This option compiles without linking a final executable.
Answer
-c
- 34To include implementations from the single-header C library, the macro_____was defined.
Hint
The macro name combines the library name with the word indicating that definitions should be emitted.
Answer
knob implementation
- 35The C structure layout expected by foreign code was requested with the representation_____.
Hint
This representation makes the Rust structure compatible with C layout conventions.
Answer
C
- 36The string builder used in the project was described as a dynamic_____.
Hint
It stores a growable sequence of elements and tracks count and capacity.
Answer
array
- 37The first major phase of a compiler highlighted in the session was_____.
Hint
This phase converts source characters into lexical units.
Answer
tokenization
- 38The library selected for tokenizing the B source was_____.
Hint
It is an existing C lexer that can be integrated through FFI.
Answer
STB Lex
- 39A lexer return value of zero was used to indicate_____.
Hint
This signals that no more tokens remain.
Answer
end of file
- 40Tokens with values less than 256 were treated as individual_____characters.
Hint
Their numeric values correspond directly to character codes.
Answer
ASCII
- 41The lexer stored identifier text in a dedicated_____store.
Hint
This buffer preserves the spelling of names recognized by the lexer.
Answer
string
- 42The compiler's helper for checking that the next token has a required value was called_____.
Hint
It reports an error when the received token differs from the required one.
Answer
expect
- 43The compiler reported the source file, line number, and character_____when diagnosing errors.
Hint
This identifies the position within a line.
Answer
offset
- 44The first compiler version intentionally implemented only a small_____of the B language.
Hint
It was not intended to support the entire language in one session.
Answer
subset
- 45The compiler was developed incrementally by first compiling a simple example and then adding more_____.
Hint
Each new capability expanded the initial minimal compiler.
Answer
features
- 46The initial B compiler represented local variables as storage allocated on the_____.
Hint
This storage is adjusted when entering and leaving a function.
Answer
stack
- 47The stack pointer register used to allocate space for local variables on x86-64 was_____.
Hint
Its name begins with R and ends with the abbreviation for stack pointer.
Answer
RSP
- 48The register used as a stable reference point for local-variable offsets was_____.
Hint
This register is commonly called the base or frame pointer.
Answer
RBP
- 49The x86-64 function prologue saved the old_____before establishing a new frame base.
Hint
The same register was restored in the function epilogue.
Answer
RBP
- 50In the simplified compiler, each B word occupied_____bytes on x86-64.
Hint
A 64-bit word contains this many bytes.
Answer
8
- 51Under the x86-64 calling convention used, the first integer argument was placed in register_____.
Hint
This is the first register in the sequence used for integer arguments.
Answer
RDI
- 52The generated B compiler used the C runtime so that functions such as putchar could be called through_____.
Hint
This library supplies standard C runtime functions.
Answer
libc
- 53The assembly backend generated output in the_____format for x86-64 object files.
Hint
This executable and linkable format is common on Unix-like systems.
Answer
ELF
- 54The assembly directive used to place executable instructions in the code section was_____.
Hint
It introduces a named region such as text.
Answer
section
- 55The procedure linkage table, abbreviated_____, can be used to call external functions in position-independent code.
Hint
It is a table used for indirect linkage to external procedures.
Answer
PLT
- 56The global offset table, abbreviated_____, supports access patterns used in position-independent code.
Hint
It stores addresses or offsets for globally referenced symbols.
Answer
GOT
- 57The program exited with a value returned through the x86-64 register_____.
Hint
This register is conventionally used for integer return values.
Answer
RAX
- 58The completed prototype supported recursive calls because it could generate multiple_____and call them by name.
Hint
A recursive program invokes the same kind of callable unit from within itself.
Answer
functions
- 59The compiler initially handled a function with one argument by loading that argument into the first calling-convention_____.
Hint
The specific register used was RDI.
Answer
register

Ask anything
We've read this whole study set, so questions about it get the best answers.