Why Does a Rust Program Look Like This? · 10 Lessons
English

Computer Fundamentals

Module 8 – Why Does a Rust Program Look Like This?

Page 4 of 10 · About 15 minutes per lesson, including practice.

Why main() Exists

main()

Every Rust program begins with main.

The operating system looks for this function first.

When you click Run, execution starts here.

The parentheses can hold information passed into the function. This example does not need any, so they stay empty.

Example code on Agila Forge ↗

Complete this lesson

Answer every check correctly to earn your lesson certificate. Feedback helps you review and try again.

Sign in · Save your progress and earn a certificate for this lesson.