Question: what are the 2 functions of ceiling joists?
Answer: they provide the structure onto which the ceiling is fixed.
they are the member that connects or ties the lower ends of rafter couples (pairs). Therefore, they prevent the rafters spreading and causing the roof to sag or collapse.