Complete the code to declare an integer variable named num with value 10.
let num: [1] = 10;
String instead of an integer type.bool which is for true/false values.f64 which is for floating-point numbers.The i32 type is the default integer type in Rust for 32-bit signed integers.
Complete the code to declare a floating-point variable named pi with value 3.14.
let pi: [1] = 3.14;
i32 which is for integers.bool which is for true/false values.char which is for single characters.The f64 type is the default floating-point type in Rust for 64-bit floats.
Fix the error in the code by choosing the correct scalar type for the variable flag.
let flag: [1] = true;char which is for characters.The bool type is used for true or false values in Rust.
Fill both blanks to declare a character variable letter with value 'A'.
let letter: [1] = [2];
String type for a single character.The char type stores a single character, which is written with single quotes like 'A'.
Fill all three blanks to declare a tuple data with an integer, a float, and a boolean.
let data: ([1], [2], [3]) = (42, 3.14, true);
char incorrectly.The tuple contains an integer (i32), a floating-point number (f64), and a boolean (bool).