Print a message using write() function
Rust Programming Language
Problem
In this program, we will print a message using the write() function.
Input
// Rust program to print a message// using write() functionuse std::io::Write;fn main() {std::io::stdout().write(format!("Hello World").as_bytes()).unwrap();}{codeBox}
Output
Hello World{codeBox}
Explanation
In the main() function, we printed the "Hello World" message using the write() function.