
Programming & Coding · Rust
Rust Intermediate Quiz: Enums, Traits & Error Handling
A Rust traits and error handling quiz: Option and Result, the ? operator, enums with data, exhaustive matches, trait bounds, lifetimes and derive.
Subject
Test your programming knowledge with interactive coding quizzes covering Python, JavaScript, Java, C, C++, C#, TypeScript, PHP, Go and Rust. Each language has a beginner quiz on syntax, variables and data types, a code output quiz where you predict what a short program prints, and an intermediate quiz on functions, objects, error handling and the features that make the language unique. Practise for a coding interview, check your computer science fundamentals or learn a new language one question at a time, with a short explanation for every answer.
30 quizzes across 10 topics, including Python, JavaScript and Java.
10 topics · choose one to see its quizzes
30 quizzes

Programming & Coding · Rust
A Rust traits and error handling quiz: Option and Result, the ? operator, enums with data, exhaustive matches, trait bounds, lifetimes and derive.

Programming & Coding · Rust
Rust borrowing and output questions: will it compile, and what will it print? Covers match, vectors, moves, mutable references, Option, Result and slices.

Programming & Coding · Rust
A Rust quiz for beginners: immutable bindings and let mut, shadowing, default types, ownership and moves, Copy types, clone(), borrowing and String.

Programming & Coding · Go
A Golang concurrency quiz: implicit interfaces, embedding, type switches, errors, goroutines, buffered channels, select, WaitGroup and Mutex.

Programming & Coding · Go
Go output questions: predict what Go prints, from shared slice arrays, len and cap, range and defer to runes, value receivers, closures and shadowing.

Programming & Coding · Go
A Golang quiz for beginners: := and zero values, package main, func, multiple return values, the for loop, exported names, slices, maps and iota.

Programming & Coding · PHP
A PHP OOP quiz: classes, constructor promotion, visibility, traits, static members, exceptions, namespaces, strict types, readonly and the nullsafe operator.

Programming & Coding · PHP
PHP output questions for PHP 8: loose comparisons, numeric strings, ??, foreach, array_map() and array_filter(), the spaceship operator, match and isset().

Programming & Coding · PHP
A PHP quiz for beginners: the <?php tag, $variables, echo, string concatenation, single versus double quotes, intdiv(), arrays, count() and strlen().