Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumRustRc<RefCell<T>> combosSingle-choice MCQ

What does `Rc::strong_count` print at the marked line?

use std::rc::Rc; use std::cell::RefCell; fn main() { let a = Rc::new(RefCell::new(5)); let b = Rc::clone(&a); { let c = Rc::clone(&b); let _w = Rc::downgrade(&a); } println!("{}", Rc::strong_count(&a)); // marked line }