fn main() {
let x: i32 = 5;
let mut y: u32 = 5;
y = x;
println!("Success!");
} ez one this time
What is the result?
A- we get error
B- we get Success! message
#rustlang #rust #programing
🦀 #RustChallenge
#rust #rustlang #programing #dev
B - true true true true
C - false treu true true
D - true false true true
vote in channele 👇
#rust #rustlang #programing #dev
fn main(){
let a = "Hello";
let b = &*&&*a;
let c = &*&*a;
let d = &**&&*a;
println!("{}", format!("{:p}", c) == format!("{:p}", a));
println!("{}", format!("{:p}", c) == format!("{:p}", b));
println!("{}", format!("{:p}", c) == format!("{:p}", c));
println!("{}", format!("{:p}", c) == format!("{:p}", d));
}
A - err (explain)B - true true true true
C - false treu true true
D - true false true true
vote in channele 👇
🦀 #RustChallenge 🦀
#rust #rustlang #programing #dev #EZ
1. Both runs and gives the output
2. CODE No2 gives output and A gives overflow error
3. CODE No2 gives output and B gives error
4. Both gives error
vote in channele and DONT FORGET TO JOIN OUR FAMELY
#rust #rustlang #programing #dev #EZ
// CODE No1What will be the outcome?
fn main(){
let x = 2;
assert_eq!(x,2_i8);
println!("{}",x.pow(6));
}
// CODE No2
fn main(){
let x = 2;
println!("{}",x.pow(6));
}
1. Both runs and gives the output
2. CODE No2 gives output and A gives overflow error
3. CODE No2 gives output and B gives error
4. Both gives error
vote in channele and DONT FORGET TO JOIN OUR FAMELY